Sonar theme = Android's real default: teal 4FD1C5 accent (not coral), dark ink on teal, logo tile #0B1220 with teal hairline, single-accent-color ping logo; icon.png regenerated teal-on-#0B1220 to match Android launcher
This commit is contained in:
parent
a459ed1e4c
commit
d362dc6f42
3 changed files with 33 additions and 28 deletions
|
|
@ -77,6 +77,11 @@ data class ShonarPalette(
|
||||||
/** Vertical page gradient endpoints; default flat = [background]. */
|
/** Vertical page gradient endpoints; default flat = [background]. */
|
||||||
val backgroundTop: Color = background,
|
val backgroundTop: Color = background,
|
||||||
val backgroundBottom: Color = background,
|
val backgroundBottom: Color = background,
|
||||||
|
/** Header logo-tile treatment; default = the generic surface/border
|
||||||
|
* look. The Sonar theme overrides these to Android's launcher
|
||||||
|
* treatment: #0B1220 tile with a teal hairline. */
|
||||||
|
val tileBackground: Color = surface,
|
||||||
|
val tileBorder: Color = border,
|
||||||
)
|
)
|
||||||
|
|
||||||
/** Charcoal with a faint blue cast, per the reference: page #16181C,
|
/** Charcoal with a faint blue cast, per the reference: page #16181C,
|
||||||
|
|
@ -126,29 +131,31 @@ private val LightPalette = ShonarPalette(
|
||||||
)
|
)
|
||||||
|
|
||||||
/** The Android companion app's palette (android/.../ui/theme/Theme.kt):
|
/** The Android companion app's palette (android/.../ui/theme/Theme.kt):
|
||||||
* deep-sea sonar navy + the phone's coral accent (#E76F51), flat
|
* deep-sea sonar navy + teal accent — the app's built-in default,
|
||||||
* background (no gradient). Values are 1:1 with the Android tokens:
|
* exactly what the phone shows (screenshot Sep 21). Values are 1:1
|
||||||
* DeepNavy/NavySurface/NavyElevated/BorderDark/TextPrimary-Dark etc.
|
* with the Android tokens: DeepNavy/NavySurface/NavyElevated/
|
||||||
* Android derives ink-on-accent from luminance; coral (0.29) < 0.4 →
|
* BorderDark/Teal etc. Android derives ink-on-accent from luminance;
|
||||||
* white, matching the phone. Kept in sync by hand — if Android's
|
* teal (0.55) > 0.4 → Ink, matching the phone. Kept in sync by hand —
|
||||||
* palette changes, change this too. */
|
* if Android's palette changes, change this too. */
|
||||||
private val SonarPalette = ShonarPalette(
|
private val SonarPalette = ShonarPalette(
|
||||||
background = Color(0xFF070D18), // DeepNavy
|
background = Color(0xFF070D18), // DeepNavy
|
||||||
surface = Color(0xFF0F1A2B), // NavySurface
|
surface = Color(0xFF0F1A2B), // NavySurface
|
||||||
surfaceAlt = Color(0xFF16233A), // NavyElevated
|
surfaceAlt = Color(0xFF16233A), // NavyElevated
|
||||||
border = Color(0xFF22364F), // BorderDark
|
border = Color(0xFF22364F), // BorderDark
|
||||||
accent = Color(0xFFE76F51), // phone's accent_color setting
|
accent = Color(0xFF4FD1C5), // Android Teal (default accent)
|
||||||
accentStrong = Color(0xFFC95B41), // filled-accent hover depth
|
accentStrong = Color(0xFF2A9D94), // Android TealDark
|
||||||
accentGlow = Color(0x33E76F51), // soft halo (~20% coral)
|
accentGlow = Color(0x334FD1C5), // soft halo (~20% teal)
|
||||||
inkOnAccent = Color(0xFFF4F8FF), // Android: white on coral
|
inkOnAccent = Color(0xFF10141A), // Android Ink: dark on bright teal
|
||||||
textPrimary = Color(0xFFE6EDF3),
|
textPrimary = Color(0xFFE6EDF3),
|
||||||
textSecondary = Color(0xFF9FB3C8),
|
textSecondary = Color(0xFF9FB3C8),
|
||||||
textMuted = Color(0xFF6B7E94),
|
textMuted = Color(0xFF6B7E94),
|
||||||
error = Color(0xFFFF6B6B), // Android ErrorDark
|
error = Color(0xFFFF6B6B), // Android ErrorDark
|
||||||
onError = Color(0xFF10141A), // Android Ink
|
onError = Color(0xFF10141A), // Android Ink
|
||||||
// Android's background is flat — no gradient.
|
// Android's background is flat — no gradient.
|
||||||
highlight = Color(0xFFFF8A70), // warm coral-tint for title text
|
tileBackground = Color(0xFF0B1220), // Android ic_launcher_background
|
||||||
highlightTint = Color(0xFF3A1D16), // coral row wash on navy
|
tileBorder = Color(0xFF4FD1C5), // teal hairline tile, per phone header
|
||||||
|
highlight = Color(0xFF5EEAD4), // TealBright for title text
|
||||||
|
highlightTint = Color(0xFF0B2E26), // deep teal row wash on navy
|
||||||
)
|
)
|
||||||
|
|
||||||
/** Which palette the app renders in. Persisted as "sonar" / "meridian"
|
/** Which palette the app renders in. Persisted as "sonar" / "meridian"
|
||||||
|
|
@ -411,42 +418,40 @@ fun ShonarTheme(
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
fun SonarLogo(size: Dp = 32.dp, modifier: Modifier = Modifier) {
|
fun SonarLogo(size: Dp = 32.dp, modifier: Modifier = Modifier) {
|
||||||
// Brand blue — same #6190E5 as the launcher icon and the theme's
|
// Single-color glyph like Android's launcher foreground (teal under
|
||||||
// interactive accent, per the user's request (Sep 21).
|
// Sonar): logo and UI accent can never disagree.
|
||||||
val accent = Shonar.BrandBlue
|
val accent = Shonar.Accent
|
||||||
val accentStrong = Shonar.BrandBlueDeep
|
|
||||||
Canvas(modifier = modifier.size(size)) {
|
Canvas(modifier = modifier.size(size)) {
|
||||||
val s = this.size.minDimension / 108f
|
val s = this.size.minDimension / 108f
|
||||||
fun c(x: Float, y: Float) = Offset(x * s, y * s)
|
fun c(x: Float, y: Float) = Offset(x * s, y * s)
|
||||||
// Center dot: r=6 at (54,54)
|
// Center dot: r=6 at (54,54)
|
||||||
drawCircle(accent, radius = 6f * s, center = c(54f, 54f))
|
drawCircle(accent, radius = 6f * s, center = c(54f, 54f))
|
||||||
// Upper-right quarter arcs (teal), centered on the dot.
|
|
||||||
val arcStyle = Stroke(width = 4f * s, cap = StrokeCap.Round)
|
val arcStyle = Stroke(width = 4f * s, cap = StrokeCap.Round)
|
||||||
fun arc(color: Color, startDeg: Float, boxTopLeft: Float) {
|
fun arc(startDeg: Float, boxTopLeft: Float) {
|
||||||
val box = when (boxTopLeft) { 38f -> 32f; else -> 56f }
|
val box = when (boxTopLeft) { 38f -> 32f; else -> 56f }
|
||||||
drawArc(
|
drawArc(
|
||||||
color, startAngle = startDeg, sweepAngle = 90f, useCenter = false,
|
accent, startAngle = startDeg, sweepAngle = 90f, useCenter = false,
|
||||||
topLeft = c(boxTopLeft, boxTopLeft),
|
topLeft = c(boxTopLeft, boxTopLeft),
|
||||||
size = androidx.compose.ui.geometry.Size(box * s, box * s),
|
size = androidx.compose.ui.geometry.Size(box * s, box * s),
|
||||||
style = arcStyle,
|
style = arcStyle,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
arc(accent, -90f, 38f)
|
arc(-90f, 38f)
|
||||||
arc(accent, -90f, 26f)
|
arc(-90f, 26f)
|
||||||
// Lower-left quarter arcs (teal-dark).
|
arc(90f, 38f)
|
||||||
arc(accentStrong, 90f, 38f)
|
arc(90f, 26f)
|
||||||
arc(accentStrong, 90f, 26f)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The reference header's logo treatment: ping inside a hairline
|
/** The header's logo treatment: ping inside a rounded tile. Under the
|
||||||
* rounded tile. */
|
* Sonar theme this is Android's launcher look — teal ping on #0B1220
|
||||||
|
* with a teal hairline border. */
|
||||||
@Composable
|
@Composable
|
||||||
fun SonarLogoTile(modifier: Modifier = Modifier, size: Dp = 40.dp) {
|
fun SonarLogoTile(modifier: Modifier = Modifier, size: Dp = 40.dp) {
|
||||||
Surface(
|
Surface(
|
||||||
modifier = modifier.size(size)
|
modifier = modifier.size(size)
|
||||||
.border(Shonar.BorderW, Shonar.Border, Shonar.ShapeCard),
|
.border(Shonar.BorderW, Shonar.LocalPalette.current.tileBorder, Shonar.ShapeCard),
|
||||||
color = Shonar.Surface,
|
color = Shonar.LocalPalette.current.tileBackground,
|
||||||
shape = Shonar.ShapeCard,
|
shape = Shonar.ShapeCard,
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.9 KiB |
BIN
icon.png
BIN
icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.9 KiB |
Loading…
Add table
Add a link
Reference in a new issue