mirror of
https://github.com/abue-ammar/tinycast.git
synced 2026-10-02 00:04:44 +08:00
Draw the oklch() swatches Color Picker states its colours in (#917)
Organize Colors builds each tile as a bare {color} swatch whose string comes
from getPreviewColor(), which formats in oklch() while the row label keeps the
user's hex preference. The extensions layer carried its own colour parser that
read #rrggbb and nothing else, so every swatch resolved to nil and fell through
to the icon placeholder: correct hex beside a grid of grey boxes.
ColorValue is already the one CSS parser, and ColorSpaces already held the
Oklab matrices one way round, so the inverse initialiser lands there and
parseFunctional gains an oklch case that reuses its own argument, percentage
and angle helpers. ExtensionImage now calls that parser and drops its hex
reader, which also gives extension tints rgb() and hsl() for free, and lets the
clipboard read back the oklch() it could already write.
This commit is contained in:
@@ -312,7 +312,9 @@ run ext-icon-test Tinycast/Platform/Appearance.swift \
|
||||
Tinycast/Features/Extensions/Service/ExtensionRuntime.swift \
|
||||
Tinycast/Features/Extensions/Service/ExtensionIconCache.swift \
|
||||
Tinycast/Features/Extensions/UI/ExtensionAnimatedImage.swift \
|
||||
Tinycast/Features/Extensions/UI/ExtensionImage.swift
|
||||
Tinycast/Features/Extensions/UI/ExtensionImage.swift \
|
||||
Tinycast/Features/Clipboard/Model/ColorValue.swift \
|
||||
Tinycast/Features/Clipboard/Model/ColorSpaces.swift
|
||||
run system-action-test Tinycast/Features/SystemActions/Model/SystemAction.swift
|
||||
run volume-test Tinycast/Features/SystemActions/Model/VolumeLevel.swift
|
||||
run window-command-test Tinycast/Features/WindowManagement/Model/WindowCommand.swift \
|
||||
@@ -480,7 +482,9 @@ run slow ext-test -parse-as-library \
|
||||
$E/UI/ExtensionImage.swift \
|
||||
$E/UI/ExtensionScreen.swift \
|
||||
$L/SearchRelevance.swift \
|
||||
Tinycast/Platform/Compression/Zlib.swift
|
||||
Tinycast/Platform/Compression/Zlib.swift \
|
||||
Tinycast/Features/Clipboard/Model/ColorValue.swift \
|
||||
Tinycast/Features/Clipboard/Model/ColorSpaces.swift
|
||||
run settings-history-test Tinycast/Features/Settings/SettingsTab.swift \
|
||||
Tinycast/Features/Settings/SettingsHistory.swift \
|
||||
Tinycast/Features/Settings/SettingsAnchor.swift \
|
||||
|
||||
Reference in New Issue
Block a user