Lines Matching refs:color
35 * {@link R.color#car_tint_light} and
36 * {@link R.color#car_tint_dark}
39 int lightTintColor = context.getResources().getColor(R.color.car_tint_light);
40 int darkTintColor = context.getResources().getColor(R.color.car_tint_dark);
47 * {@link R.color#car_tint_light} and
48 * {@link R.color#car_tint_dark}
51 int lightTintColor = context.getResources().getColor(R.color.car_tint_light);
52 int darkTintColor = context.getResources().getColor(R.color.car_tint_dark);
73 * Determines what color to tint icons given the background color that they sit on.
76 * @param bgColor The background color that the icons sit on.
78 * @return The color that the icons should be tinted. Will be the first tinted color that
92 Log.w(TAG, "Tint color does not meet contrast requirements. Using white.");
95 Log.w(TAG, "Tint color does not meet contrast requirements. Using black.");
110 * Calculates the luminance of a color as specified by:
113 * @param color The color to calculate the luminance of.
116 public static double getLuminance(int color) {
118 double r = convert8BitToLuminanceComponent(Color.red(color));
119 double g = convert8BitToLuminanceComponent(Color.green(color));
120 double b = convert8BitToLuminanceComponent(Color.blue(color));
125 * Converts am 8 bit color component (0-255) to the luminance component as specified by: