diff options
| author | Danny Lin <danny@kdrag0n.dev> | 2021-10-11 20:35:24 -0700 |
|---|---|---|
| committer | Danny Lin <danny@kdrag0n.dev> | 2021-10-11 21:19:30 -0700 |
| commit | 9b8f8b3b1797bd3b8718775df4ef35f9b4cafcb5 (patch) | |
| tree | 2a834b224e65207f9bd2d96118ba02da69d8578a | |
| parent | 826ddb8f8596bc62925f45ab662941b5b220e8d7 (diff) | |
Log generated colors
This is very useful for identifying usage of different Material You
colors across the system.
| -rw-r--r-- | src/main/kotlin/dev/kdrag0n/monet/theme/DynamicColorScheme.kt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/kotlin/dev/kdrag0n/monet/theme/DynamicColorScheme.kt b/src/main/kotlin/dev/kdrag0n/monet/theme/DynamicColorScheme.kt index 2bab8cc..b411843 100644 --- a/src/main/kotlin/dev/kdrag0n/monet/theme/DynamicColorScheme.kt +++ b/src/main/kotlin/dev/kdrag0n/monet/theme/DynamicColorScheme.kt @@ -1,5 +1,6 @@ package dev.kdrag0n.monet.theme +import android.util.Log import dev.kdrag0n.colorkt.Color import dev.kdrag0n.colorkt.cam.Zcam import dev.kdrag0n.colorkt.cam.Zcam.Companion.toZcam @@ -22,6 +23,10 @@ class DynamicColorScheme( } private val seedAccent = seedNeutral + init { + Log.i(TAG, "Seed color: ${seedColor.convert<Srgb>().toHex()} => $seedNeutral") + } + // Main accent color. Generally, this is close to the seed color. override val accent1 = transformSwatch(targets.accent1, seedAccent, targets.accent1) // Secondary accent color. Darker shades of accent1. @@ -51,6 +56,7 @@ class DynamicColorScheme( val newLch = transformColor(target, seed, reference) val newSrgb = newLch.convert<Srgb>() + Log.d(TAG, "Transform: [$shade] $target => $newLch => ${newSrgb.toHex()}") shade to newSrgb }.toMap() } @@ -85,6 +91,8 @@ class DynamicColorScheme( } companion object { + private const val TAG = "DynamicColorScheme" + // Hue shift for the tertiary accent color (accent3), in degrees. // 60 degrees = shifting by a secondary color private const val ACCENT3_HUE_SHIFT_DEGREES = 60.0 |
