Skip to content

[color-swatch][color-scale] Option to show coords #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LeaVerou opened this issue Jun 4, 2024 · 1 comment
Closed

[color-swatch][color-scale] Option to show coords #81

LeaVerou opened this issue Jun 4, 2024 · 1 comment

Comments

@LeaVerou
Copy link
Member

LeaVerou commented Jun 4, 2024

<color-swatch> should support an option to list any coords in any color space. Name TBB, let's use coords for now.
Type would be array of objects and the default label would be the coord name.

<color-swatch color="#f8f9fa" coords="L: oklch.l, C: oklch.c, H: oklch.h"></color-swatch>

Rendering could look like this. Ideally should have a container query that lays out horizontally unless there is not enough space.

image

<color-scale> should support the same attribute and just pass it along to its swatches.

@LeaVerou
Copy link
Member Author

This has now been implemented (thanks @DmitrySharabin)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant