@@ -113,6 +113,21 @@ public float getOnContainerDisabledAlpha() {
113
113
public float getContainerOutlineDisabledAlpha () {
114
114
return tonalContainerColorResolver .getContainerOutlineDisabledAlpha (dynamicScheme );
115
115
}
116
+
117
+ @ Override
118
+ public Color getInverseContainerSurface () {
119
+ return tonalContainerColorResolver .getInverseContainerSurface (dynamicScheme );
120
+ }
121
+
122
+ @ Override
123
+ public Color getInverseOnContainer () {
124
+ return tonalContainerColorResolver .getInverseOnContainer (dynamicScheme );
125
+ }
126
+
127
+ @ Override
128
+ public Color getInverseContainerOutline () {
129
+ return tonalContainerColorResolver .getInverseContainerOutline (dynamicScheme );
130
+ }
116
131
};
117
132
}
118
133
@@ -168,23 +183,28 @@ private static ContainerColorTokens overlay(ContainerColorTokens original,
168
183
overlay , (int ) (255 * overlayAmount ));
169
184
170
185
// Apply overlay on the container tokens
171
- Color containerLowest = RadianceColorUtilities .overlayColor (
186
+ Color containerSurfaceLowest = RadianceColorUtilities .overlayColor (
172
187
original .getContainerSurfaceLowest (), overlayWithAlpha );
173
- Color containerLow = RadianceColorUtilities .overlayColor (
188
+ Color containerSurfaceLow = RadianceColorUtilities .overlayColor (
174
189
original .getContainerSurfaceLow (), overlayWithAlpha );
175
- Color container = RadianceColorUtilities .overlayColor (
190
+ Color containerSurface = RadianceColorUtilities .overlayColor (
176
191
original .getContainerSurface (), overlayWithAlpha );
177
- Color containerHigh = RadianceColorUtilities .overlayColor (
192
+ Color containerSurfaceHigh = RadianceColorUtilities .overlayColor (
178
193
original .getContainerSurfaceHigh (), overlayWithAlpha );
179
- Color containerHighest = RadianceColorUtilities .overlayColor (
194
+ Color containerSurfaceHighest = RadianceColorUtilities .overlayColor (
180
195
original .getContainerSurfaceHighest (), overlayWithAlpha );
196
+ Color inverseContainerSurface = RadianceColorUtilities .overlayColor (
197
+ original .getInverseContainerSurface (), overlayWithAlpha );
181
198
182
199
// Leave on container and container outline tokens as they are
183
200
Color onContainer = original .getOnContainer ();
184
201
Color onContainerVariant = original .getOnContainerVariant ();
185
202
Color containerOutline = original .getContainerOutline ();
186
203
Color containerOutlineVariant = original .getContainerOutlineVariant ();
187
204
205
+ Color inverseOnContainer = original .getInverseOnContainer ();
206
+ Color inverseContainerOutline = original .getInverseContainerOutline ();
207
+
188
208
return new ContainerColorTokens () {
189
209
@ Override
190
210
public boolean isDark () {
@@ -193,27 +213,27 @@ public boolean isDark() {
193
213
194
214
@ Override
195
215
public Color getContainerSurfaceLowest () {
196
- return containerLowest ;
216
+ return containerSurfaceLowest ;
197
217
}
198
218
199
219
@ Override
200
220
public Color getContainerSurfaceLow () {
201
- return containerLow ;
221
+ return containerSurfaceLow ;
202
222
}
203
223
204
224
@ Override
205
225
public Color getContainerSurface () {
206
- return container ;
226
+ return containerSurface ;
207
227
}
208
228
209
229
@ Override
210
230
public Color getContainerSurfaceHigh () {
211
- return containerHigh ;
231
+ return containerSurfaceHigh ;
212
232
}
213
233
214
234
@ Override
215
235
public Color getContainerSurfaceHighest () {
216
- return containerHighest ;
236
+ return containerSurfaceHighest ;
217
237
}
218
238
219
239
@ Override
@@ -250,6 +270,21 @@ public float getOnContainerDisabledAlpha() {
250
270
public float getContainerOutlineDisabledAlpha () {
251
271
return original .getContainerOutlineDisabledAlpha ();
252
272
}
273
+
274
+ @ Override
275
+ public Color getInverseContainerSurface () {
276
+ return inverseContainerSurface ;
277
+ }
278
+
279
+ @ Override
280
+ public Color getInverseOnContainer () {
281
+ return inverseOnContainer ;
282
+ }
283
+
284
+ @ Override
285
+ public Color getInverseContainerOutline () {
286
+ return inverseContainerOutline ;
287
+ }
253
288
};
254
289
}
255
290
@@ -387,6 +422,11 @@ public Color getSurfaceBright() {
387
422
return schemeColorResolver .getSurfaceBright (scheme );
388
423
}
389
424
425
+ @ Override
426
+ public Color getInverseSurface () {
427
+ return schemeColorResolver .getInverseSurface (scheme );
428
+ }
429
+
390
430
@ Override
391
431
public ContainerColorTokens getNeutralContainerTokens () {
392
432
return neutralContainerTokens ;
@@ -587,6 +627,21 @@ public float getOnContainerDisabledAlpha() {
587
627
public float getContainerOutlineDisabledAlpha () {
588
628
return colorResolver .getContainerOutlineDisabledAlpha (dynamicPalette );
589
629
}
630
+
631
+ @ Override
632
+ public Color getInverseContainerSurface () {
633
+ return colorResolver .getInverseContainerSurface (dynamicPalette );
634
+ }
635
+
636
+ @ Override
637
+ public Color getInverseOnContainer () {
638
+ return colorResolver .getInverseOnContainer (dynamicPalette );
639
+ }
640
+
641
+ @ Override
642
+ public Color getInverseContainerOutline () {
643
+ return colorResolver .getInverseContainerOutline (dynamicPalette );
644
+ }
590
645
};
591
646
}
592
647
@@ -631,6 +686,11 @@ public Color getSurfaceBright() {
631
686
return colorResolver .getSurfaceBright (dynamicPalette );
632
687
}
633
688
689
+ @ Override
690
+ public Color getInverseSurface () {
691
+ return colorResolver .getInverseSurface (dynamicPalette );
692
+ }
693
+
634
694
@ Override
635
695
public ContainerColorTokens getBaseContainerTokens () {
636
696
return baseTokens ;
@@ -713,6 +773,24 @@ public float getOnContainerDisabledAlpha() {
713
773
public float getContainerOutlineDisabledAlpha () {
714
774
return original .getContainerOutlineDisabledAlpha ();
715
775
}
776
+
777
+ @ Override
778
+ public Color getInverseContainerSurface () {
779
+ return new Color (Blend .cam16Ucs (original .getInverseContainerSurface ().getRGB (),
780
+ Color .WHITE .getRGB (), tintFactor ));
781
+ }
782
+
783
+ @ Override
784
+ public Color getInverseOnContainer () {
785
+ return new Color (Blend .cam16Ucs (original .getInverseOnContainer ().getRGB (),
786
+ Color .WHITE .getRGB (), tintFactor ));
787
+ }
788
+
789
+ @ Override
790
+ public Color getInverseContainerOutline () {
791
+ return new Color (Blend .cam16Ucs (original .getInverseContainerOutline ().getRGB (),
792
+ Color .WHITE .getRGB (), tintFactor ));
793
+ }
716
794
};
717
795
}
718
796
@@ -791,6 +869,24 @@ public float getOnContainerDisabledAlpha() {
791
869
public float getContainerOutlineDisabledAlpha () {
792
870
return original .getContainerOutlineDisabledAlpha ();
793
871
}
872
+
873
+ @ Override
874
+ public Color getInverseContainerSurface () {
875
+ return new Color (Blend .cam16Ucs (original .getInverseContainerSurface ().getRGB (),
876
+ Color .BLACK .getRGB (), shadeFactor ));
877
+ }
878
+
879
+ @ Override
880
+ public Color getInverseOnContainer () {
881
+ return new Color (Blend .cam16Ucs (original .getInverseOnContainer ().getRGB (),
882
+ Color .BLACK .getRGB (), shadeFactor ));
883
+ }
884
+
885
+ @ Override
886
+ public Color getInverseContainerOutline () {
887
+ return new Color (Blend .cam16Ucs (original .getInverseContainerOutline ().getRGB (),
888
+ Color .BLACK .getRGB (), shadeFactor ));
889
+ }
794
890
};
795
891
}
796
892
}
0 commit comments