mirror of
https://github.com/tiennm99/claude-code-usage-bubble.git
synced 2026-09-09 04:17:13 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2e48cc119 | ||
|
|
bee9f3cfa0 |
Generated
+1
-1
@@ -59,7 +59,7 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "claude-code-usage-bubble"
|
name = "claude-code-usage-bubble"
|
||||||
version = "0.3.6"
|
version = "0.3.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dirs",
|
"dirs",
|
||||||
"embed-resource",
|
"embed-resource",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "claude-code-usage-bubble"
|
name = "claude-code-usage-bubble"
|
||||||
version = "0.3.6"
|
version = "0.3.7"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
description = "Floating bubble showing Claude Code and Codex usage on Windows"
|
description = "Floating bubble showing Claude Code and Codex usage on Windows"
|
||||||
|
|||||||
+15
-8
@@ -5,20 +5,27 @@
|
|||||||
use crate::os::Rgb as Color;
|
use crate::os::Rgb as Color;
|
||||||
use crate::usage::ProviderId;
|
use crate::usage::ProviderId;
|
||||||
|
|
||||||
/// Per-provider identity color. Claude = warm orange `#D97757`. Codex =
|
/// Per-provider identity color. Claude = warm orange `#D97757`. Codex tracks
|
||||||
/// OpenAI brand teal `#10A37F`, used consistently across dark and light
|
/// the OpenAI Codex monochrome palette — near-white `#E5E5E5` on dark themes,
|
||||||
/// themes so the badge/bubble/panel never disagree on Codex identity.
|
/// near-black `#1A1A1A` on light — so the accent stays readable against both
|
||||||
pub fn accent_color_for(model: ProviderId, _is_dark: bool) -> Color {
|
/// the dark bubble surface and the `#F3F3F3` light background.
|
||||||
|
pub fn accent_color_for(model: ProviderId, is_dark: bool) -> Color {
|
||||||
match model {
|
match model {
|
||||||
ProviderId::Claude => Color::from_hex("#D97757"),
|
ProviderId::Claude => Color::from_hex("#D97757"),
|
||||||
ProviderId::ChatGpt => Color::from_hex("#10A37F"),
|
ProviderId::ChatGpt => {
|
||||||
|
if is_dark {
|
||||||
|
Color::from_hex("#E5E5E5")
|
||||||
|
} else {
|
||||||
|
Color::from_hex("#1A1A1A")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Discrete 4-band fill color. The "safe" band uses the provider's identity
|
/// Discrete 4-band fill color. The "safe" band uses the provider's identity
|
||||||
/// color so Codex bars stay white-on-dark while Claude bars stay orange; the
|
/// color so Codex bars render monochrome (light-on-dark / dark-on-light) while
|
||||||
/// warning bands are theme-aware so light-mode amber stays readable against
|
/// Claude bars stay orange; the warning bands are theme-aware so light-mode
|
||||||
/// the `#F3F3F3` background.
|
/// amber stays readable against the `#F3F3F3` background.
|
||||||
///
|
///
|
||||||
/// - <60% → provider accent
|
/// - <60% → provider accent
|
||||||
/// - 60–80% → amber (dark `#E0A040`, light `#B47A20` for WCAG AA contrast)
|
/// - 60–80% → amber (dark `#E0A040`, light `#B47A20` for WCAG AA contrast)
|
||||||
|
|||||||
Reference in New Issue
Block a user