Add new surface colors to color schemes
This commit is contained in:
@@ -51,6 +51,15 @@ public final class CorePalette {
|
||||
return new CorePalette(argb, true);
|
||||
}
|
||||
|
||||
public CorePalette(TonalPalette a1, TonalPalette a2, TonalPalette a3, TonalPalette n1, TonalPalette n2, TonalPalette error) {
|
||||
this.a1 = a1;
|
||||
this.a2 = a2;
|
||||
this.a3 = a3;
|
||||
this.n1 = n1;
|
||||
this.n2 = n2;
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
private CorePalette(int argb, boolean isContent) {
|
||||
Hct hct = Hct.fromInt(argb);
|
||||
double hue = hct.getHue();
|
||||
|
||||
@@ -157,7 +157,7 @@ public class Scheme {
|
||||
return darkFromCorePalette(CorePalette.contentOf(argb));
|
||||
}
|
||||
|
||||
private static Scheme lightFromCorePalette(CorePalette core) {
|
||||
public static Scheme lightFromCorePalette(CorePalette core) {
|
||||
return new Scheme()
|
||||
.withPrimary(core.a1.tone(40))
|
||||
.withOnPrimary(core.a1.tone(100))
|
||||
@@ -197,7 +197,7 @@ public class Scheme {
|
||||
.withSurfaceContainerHighest(core.n1.tone(90));
|
||||
}
|
||||
|
||||
private static Scheme darkFromCorePalette(CorePalette core) {
|
||||
public static Scheme darkFromCorePalette(CorePalette core) {
|
||||
return new Scheme()
|
||||
.withPrimary(core.a1.tone(80))
|
||||
.withOnPrimary(core.a1.tone(20))
|
||||
|
||||
Reference in New Issue
Block a user