Skip to content

Commit

Permalink
Fixed border visuals of tonal Office Silver 2007 skin
Browse files Browse the repository at this point in the history
For #400
  • Loading branch information
kirill-grouchnikov committed Jan 5, 2025
1 parent c476614 commit a1fb493
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,14 @@ public OfficeSilver2007Skin() {
ContainerColorTokensSingleColorQuery.CONTAINER_LOW});

FractionBasedTonalBorderPainter outerBorderPainter = new FractionBasedTonalBorderPainter(
"Office Silver 2007 Outer", new float[] {0.0f, 0.5f, 1.0f},
"Office Silver 2007 Outer", new float[] {0.0f, 1.0f},
new ContainerColorTokensSingleColorQuery[] {
ContainerColorTokensSingleColorQuery.CONTAINER_LOW,
ContainerColorTokensSingleColorQuery.CONTAINER_HIGHEST,
ContainerColorTokensSingleColorQuery.CONTAINER
ContainerColorTokensSingleColorQuery.CONTAINER_OUTLINE,
ContainerColorTokensSingleColorQuery.CONTAINER_OUTLINE
});
RadianceBorderPainter innerBorderPainter = new DelegateFractionBasedTonalBorderPainter(
"Office Silver 2007 Inner", outerBorderPainter,
new int[] {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF},
new int[] {0xFFFFFFFF, 0xFFFFFFFF},
scheme -> ColorSchemeUtils.tint(scheme, 0.8f));
this.borderPainter = new CompositeBorderPainter("Office Silver 2007",
outerBorderPainter, innerBorderPainter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,55 +837,55 @@ public boolean isDark() {

@Override
public Color getContainerSurfaceLowest() {
return new Color(Blend.hctHue(original.getContainerSurfaceLowest().getRGB(),
return new Color(Blend.cam16Ucs(original.getContainerSurfaceLowest().getRGB(),
Color.WHITE.getRGB(), tintFactor));
}

@Override
public Color getContainerSurfaceLow() {
return new Color(Blend.hctHue(original.getContainerSurfaceLow().getRGB(),
return new Color(Blend.cam16Ucs(original.getContainerSurfaceLow().getRGB(),
Color.WHITE.getRGB(), tintFactor));
}

@Override
public Color getContainerSurface() {
return new Color(Blend.hctHue(original.getContainerSurface().getRGB(),
return new Color(Blend.cam16Ucs(original.getContainerSurface().getRGB(),
Color.WHITE.getRGB(), tintFactor));
}

@Override
public Color getContainerSurfaceHigh() {
return new Color(Blend.hctHue(original.getContainerSurfaceHigh().getRGB(),
return new Color(Blend.cam16Ucs(original.getContainerSurfaceHigh().getRGB(),
Color.WHITE.getRGB(), tintFactor));
}

@Override
public Color getContainerSurfaceHighest() {
return new Color(Blend.hctHue(original.getContainerSurfaceHighest().getRGB(),
return new Color(Blend.cam16Ucs(original.getContainerSurfaceHighest().getRGB(),
Color.WHITE.getRGB(), tintFactor));
}

@Override
public Color getOnContainer() {
return new Color(Blend.hctHue(original.getOnContainer().getRGB(),
return new Color(Blend.cam16Ucs(original.getOnContainer().getRGB(),
Color.WHITE.getRGB(), tintFactor));
}

@Override
public Color getOnContainerVariant() {
return new Color(Blend.hctHue(original.getOnContainerVariant().getRGB(),
return new Color(Blend.cam16Ucs(original.getOnContainerVariant().getRGB(),
Color.WHITE.getRGB(), tintFactor));
}

@Override
public Color getContainerOutline() {
return new Color(Blend.hctHue(original.getContainerOutline().getRGB(),
return new Color(Blend.cam16Ucs(original.getContainerOutline().getRGB(),
Color.WHITE.getRGB(), tintFactor));
}

@Override
public Color getContainerOutlineVariant() {
return new Color(Blend.hctHue(original.getContainerOutlineVariant().getRGB(),
return new Color(Blend.cam16Ucs(original.getContainerOutlineVariant().getRGB(),
Color.WHITE.getRGB(), tintFactor));
}

Expand Down

0 comments on commit a1fb493

Please sign in to comment.