You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-5Lines changed: 20 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,17 +18,32 @@ The HSLuv color space is particularly beneficial in scenarios where perceptual u
18
18
19
19
4.**Digital Art and Image Processing**: Offers fine-tuning of colors for subtle and precise adjustments.
20
20
21
-
5.**Color Grading in Film and Photography**: Facilitates harmonious color transitions and adjustments.
22
-
23
21
In summary, HSLuv's appeal lies in its ability to provide visually consistent and natural-looking colors, making it suitable for design, data visualization, and artistic applications.
24
22
25
-
## Implementation
23
+
## Implementation Notes
24
+
25
+
This started as a port of the [Go implementation of hsluv.org](https://github.com/hsluv/hsluv-go).
This is a mostly faithful port of the Go implementation of hsluv.org at https://github.com/hsluv/hsluv-go.
39
+
In addition to the HSLuv and HPLuv conversion functions, this package also exposes
40
+
- color conversion functions between the various color spaces used to enable the HSLuv and HPluv conversions
41
+
- pretty printers `pp_hsluv`, `pp_hpluv`, etc.
42
+
- a library `hsluv.float_conv` for conversions between float triples and the provided color types
28
43
29
44
## Tests
30
45
31
-
The implementation is tested against the [hsluv snapshot (revision 4)](https://raw.githubusercontent.com/hsluv/hsluv/master/snapshots/snapshot-rev4.json). Test cases are included and can be run with
46
+
The implementation is tested against the [hsluv snapshot (revision 4)](https://raw.githubusercontent.com/hsluv/hsluv/master/snapshots/snapshot-rev4.json). Tests for all conversion functions are included and can be run with
HSLuv is a color space designed to provide a more human-friendly and uniform representation of colors, compared to traditional color spaces like RGB or HSL.
4
+
5
+
The key feature of HSLuv is its ability to maintain perceived color brightness and contrast uniformly across its hue and saturation range.
6
+
7
+
HSLuv is particularly useful in applications where color consistency and perceptual uniformity are important, such as in graphical design, data visualization, and user interface development.
8
+
9
+
You can find more information about HSLuv on {{: https://www.hsluv.org/}the official HSLuv website}.
10
+
11
+
{1 Libraries}
12
+
13
+
{2 hsluv}
14
+
15
+
Module:
16
+
- {!Hsluv} - HSLuv and HPLuv color models as well as other common color spaces like RGB and XYZ, modeled as record types; provides conversion functions between the different color spaces and pretty-printers for all the color types.
17
+
18
+
{2 hsluv.float_conv}
19
+
20
+
Module:
21
+
- {!Hsluv_float_conv} - convert between the record types of the different color spaces defined in {!Hsluv} and float triple representations
(synopsis"HSLuv human-friendly color space implementation in OCaml")
22
-
(description "This package implements the HSLuv color space model, providing a perceptually uniform alternative to traditional HSL. It includes functions for converting between HSLuv/HPLuv and other color spaces like RGB, XYZ, and Luv.")
23
+
(description "This package implements the HSLuv color space model,
24
+
providing a perceptually uniform alternative to traditional HSL.
25
+
It includes functions for converting between HSLuv/HPLuv
26
+
and other color spaces like RGB, XYZ, LCH, and LUV, as well as hexadecimal
Copy file name to clipboardExpand all lines: hsluv.opam
+19-3Lines changed: 19 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,29 @@
1
1
# This file is generated by dune, edit dune-project instead
2
2
opam-version: "2.0"
3
+
version: "0.1.0"
3
4
synopsis: "HSLuv human-friendly color space implementation in OCaml"
4
-
description:
5
-
"This package implements the HSLuv color space model, providing a perceptually uniform alternative to traditional HSL. It includes functions for converting between HSLuv/HPLuv and other color spaces like RGB, XYZ, and Luv."
5
+
description: """
6
+
This package implements the HSLuv color space model,
7
+
providing a perceptually uniform alternative to traditional HSL.
8
+
It includes functions for converting between HSLuv/HPLuv
9
+
and other color spaces like RGB, XYZ, LCH, and LUV, as well as hexadecimal
0 commit comments