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]. */
|
||||
val backgroundTop: 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,
|
||||
|
|
@ -126,29 +131,31 @@ private val LightPalette = ShonarPalette(
|
|||
)
|
||||
|
||||
/** The Android companion app's palette (android/.../ui/theme/Theme.kt):
|
||||
* deep-sea sonar navy + the phone's coral accent (#E76F51), flat
|
||||
* background (no gradient). Values are 1:1 with the Android tokens:
|
||||
* DeepNavy/NavySurface/NavyElevated/BorderDark/TextPrimary-Dark etc.
|
||||
* Android derives ink-on-accent from luminance; coral (0.29) < 0.4 →
|
||||
* white, matching the phone. Kept in sync by hand — if Android's
|
||||
* palette changes, change this too. */
|
||||
* deep-sea sonar navy + teal accent — the app's built-in default,
|
||||
* exactly what the phone shows (screenshot Sep 21). Values are 1:1
|
||||
* with the Android tokens: DeepNavy/NavySurface/NavyElevated/
|
||||
* BorderDark/Teal etc. Android derives ink-on-accent from luminance;
|
||||
* teal (0.55) > 0.4 → Ink, matching the phone. Kept in sync by hand —
|
||||
* if Android's palette changes, change this too. */
|
||||
private val SonarPalette = ShonarPalette(
|
||||
background = Color(0xFF070D18), // DeepNavy
|
||||
surface = Color(0xFF0F1A2B), // NavySurface
|
||||
surfaceAlt = Color(0xFF16233A), // NavyElevated
|
||||
border = Color(0xFF22364F), // BorderDark
|
||||
accent = Color(0xFFE76F51), // phone's accent_color setting
|
||||
accentStrong = Color(0xFFC95B41), // filled-accent hover depth
|
||||
accentGlow = Color(0x33E76F51), // soft halo (~20% coral)
|
||||
inkOnAccent = Color(0xFFF4F8FF), // Android: white on coral
|
||||
accent = Color(0xFF4FD1C5), // Android Teal (default accent)
|
||||
accentStrong = Color(0xFF2A9D94), // Android TealDark
|
||||
accentGlow = Color(0x334FD1C5), // soft halo (~20% teal)
|
||||
inkOnAccent = Color(0xFF10141A), // Android Ink: dark on bright teal
|
||||
textPrimary = Color(0xFFE6EDF3),
|
||||
textSecondary = Color(0xFF9FB3C8),
|
||||
textMuted = Color(0xFF6B7E94),
|
||||
error = Color(0xFFFF6B6B), // Android ErrorDark
|
||||
onError = Color(0xFF10141A), // Android Ink
|
||||
// Android's background is flat — no gradient.
|
||||
highlight = Color(0xFFFF8A70), // warm coral-tint for title text
|
||||
highlightTint = Color(0xFF3A1D16), // coral row wash on navy
|
||||
tileBackground = Color(0xFF0B1220), // Android ic_launcher_background
|
||||
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"
|
||||
|
|
@ -411,42 +418,40 @@ fun ShonarTheme(
|
|||
*/
|
||||
@Composable
|
||||
fun SonarLogo(size: Dp = 32.dp, modifier: Modifier = Modifier) {
|
||||
// Brand blue — same #6190E5 as the launcher icon and the theme's
|
||||
// interactive accent, per the user's request (Sep 21).
|
||||
val accent = Shonar.BrandBlue
|
||||
val accentStrong = Shonar.BrandBlueDeep
|
||||
// Single-color glyph like Android's launcher foreground (teal under
|
||||
// Sonar): logo and UI accent can never disagree.
|
||||
val accent = Shonar.Accent
|
||||
Canvas(modifier = modifier.size(size)) {
|
||||
val s = this.size.minDimension / 108f
|
||||
fun c(x: Float, y: Float) = Offset(x * s, y * s)
|
||||
// Center dot: r=6 at (54,54)
|
||||
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)
|
||||
fun arc(color: Color, startDeg: Float, boxTopLeft: Float) {
|
||||
fun arc(startDeg: Float, boxTopLeft: Float) {
|
||||
val box = when (boxTopLeft) { 38f -> 32f; else -> 56f }
|
||||
drawArc(
|
||||
color, startAngle = startDeg, sweepAngle = 90f, useCenter = false,
|
||||
accent, startAngle = startDeg, sweepAngle = 90f, useCenter = false,
|
||||
topLeft = c(boxTopLeft, boxTopLeft),
|
||||
size = androidx.compose.ui.geometry.Size(box * s, box * s),
|
||||
style = arcStyle,
|
||||
)
|
||||
}
|
||||
arc(accent, -90f, 38f)
|
||||
arc(accent, -90f, 26f)
|
||||
// Lower-left quarter arcs (teal-dark).
|
||||
arc(accentStrong, 90f, 38f)
|
||||
arc(accentStrong, 90f, 26f)
|
||||
arc(-90f, 38f)
|
||||
arc(-90f, 26f)
|
||||
arc(90f, 38f)
|
||||
arc(90f, 26f)
|
||||
}
|
||||
}
|
||||
|
||||
/** The reference header's logo treatment: ping inside a hairline
|
||||
* rounded tile. */
|
||||
/** The header's logo treatment: ping inside a rounded tile. Under the
|
||||
* Sonar theme this is Android's launcher look — teal ping on #0B1220
|
||||
* with a teal hairline border. */
|
||||
@Composable
|
||||
fun SonarLogoTile(modifier: Modifier = Modifier, size: Dp = 40.dp) {
|
||||
Surface(
|
||||
modifier = modifier.size(size)
|
||||
.border(Shonar.BorderW, Shonar.Border, Shonar.ShapeCard),
|
||||
color = Shonar.Surface,
|
||||
.border(Shonar.BorderW, Shonar.LocalPalette.current.tileBorder, Shonar.ShapeCard),
|
||||
color = Shonar.LocalPalette.current.tileBackground,
|
||||
shape = Shonar.ShapeCard,
|
||||
) {
|
||||
Column(
|
||||
|
|
|
|||
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