Skip to content

Commit

Permalink
Auto generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eero-lehtinen authored and github-actions[bot] committed Nov 21, 2024
1 parent 7e08e7e commit b97a940
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions doc/oklch-color-picker.nvim.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*oklch-color-picker.nvim.txt* For NVIM v0.10.0 Last change: 2024 November 20
*oklch-color-picker.nvim.txt* For NVIM v0.10.0 Last change: 2024 November 21

==============================================================================
Table of Contents *oklch-color-picker.nvim-table-of-contents*
Expand All @@ -16,7 +16,9 @@ FEATURES *oklch-color-picker.nvim-features*
- Select and edit buffer colors in a graphical picker
- Fast async color highlighting
- Supports multiple formats:
- Hex (`#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA`), CSS (`rgb(..)`, `hsl(..)`, `oklch(..)`)
- Hex (`#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA`)
- CSS (`rgb(..)`, `hsl(..)`, `oklch(..)`)
- Hex literal (`0xRRGGBB`, `OxAARRGGBB`)
- Can recognize any numbers in brackets as a color (e.g., `vec3(0.5, 0.5, 0.5)`)
- Custom formats can be defined
- Integrated graphical color picker <https://github.com/eero-lehtinen/oklch-color-picker> using the perceptual Oklch color space:
Expand Down Expand Up @@ -70,6 +72,10 @@ DEFAULT OPTIONS *oklch-color-picker.nvim-default-options*
'()hsla?%(.-%)()',
'()oklch%(.-%)()',
},
hex_literal = {
priority = -1,
'()0x%x%x%x%x%x%x+%f[%W]()',
},
numbers_in_brackets = {
priority = -10,
-- Allows any digits, dots, commas or whitespace within brackets.
Expand Down Expand Up @@ -138,9 +144,9 @@ Highlighting can be controlled at runtime:
COLOR FORMATS ~

The picker application supports the following formats: (`hex`, `rgb`, `oklch`,
`hsl`, `raw_rgb`, `raw_rgb_float`, `raw_rgb_linear`, `raw_oklch`). Most of
these are auto detected. The non-raw formats are used in CSS and easily auto
detected because the colors are surrounded by `rgb()` etc.
`hsl`, `hex_literal`, `raw_rgb`, `raw_rgb_float`, `raw_rgb_linear`,
`raw_oklch`). Most of these are auto detected. E.g. CSS rgb values are detected
because they are surrounded by `rgb()` and hex starts with `#`.

The raw formats are just lists of numbers separated by commas that can be used
with any programming language. The picker auto detection assumes raw formats to
Expand All @@ -160,7 +166,7 @@ The default `numbers_in_brackets` should already handle most needs. It matches
any number of digits, dots and commas inside brackets. The numbers are
validated by the picker application so the pattern doesn’t need to specify
exact number matching. You can still create your own patterns if you have
linear colors that can’t be auto detected.
linear colors or your functions names clash with CSS.

The patterns should contain two empty groups `()` to designate the replacement
range. E.g. `vec3%(()[%d.,%s]+()%)` will find `.1,.2,.2` from within the text
Expand Down

0 comments on commit b97a940

Please sign in to comment.