zorg
77199cde0b
Update colour.lua
...
*To Appease A Linter.*
2023-12-11 04:37:55 +01:00
zorg
5caab66d58
Add to colour.lua
...
Added RGB-HSV, HSV-RGB, HSV-HSL, HSL-HSV conversion functions.
2023-12-11 03:32:14 +01:00
Max Cahill
4f86dc0a5e
keep both bitop and float-only pack/unpack functions in colour
2022-09-13 11:15:08 +10:00
Miku AuahDark
fabbd3f702
colour: Don't depend on bit library.
2022-05-09 10:16:43 +08:00
Max Cahill
be48dd9115
clarified blue vs chroma b in oklab functions
2022-04-22 10:08:55 +10:00
Max Cahill
cb3083bc79
added oklab support to colour.lua (needs testing)
2022-04-05 14:51:49 +10:00
David Briscoe
0c193d7901
lint: Don't assign values that will never be used
...
No bugs here, but giving an initial value can hide cases where we fail
to set a value. Use an assert instead so we can see errors if we change
and break this code.
Except break_next which goes out of scope after it's assigned (I guess
it used to be outside the loop).
2022-03-03 10:17:35 -08:00
Max Cahill
f5eda744b9
clarified declaration of h in colour.rgb_to_hsl
...
fixes #43
2021-11-23 10:41:09 +11:00
Max Cahill
c10338fa5d
Added (more helpful) error on first use rather than on require when missing bitops library for colour.pack/unpack methods
...
fixes https://github.com/1bardesign/batteries/issues/35
2021-10-19 11:48:16 +11:00
monolifed
e9687d763f
rgb to hsl
2021-06-06 09:00:43 +03:00
Max Cahill
7185a91fc5
[dev] note about oklab colour space
2021-01-15 16:22:01 +11:00
Max Cahill
e957a4502f
[added] colour.distance_rgb and distance_packed_rgb
2020-08-18 19:54:24 +10:00
Max Cahill
324a5b4783
[dev]
2020-08-12 20:27:28 +10:00
Max Cahill
ba221060c5
[modified] colour fairly extensively; renamed functions to same snake_case convention as other modules
...
[added] colour.hsl_to_rgb
2020-06-15 21:11:05 +10:00
Max Cahill
6386aaf298
[modified] big refactor to localised modules and require("batteries"):export()
for global usage; renamed files table
to tablex
and math
to mathx
to allow using the library in your module root if you really want to.
2020-04-07 13:49:10 +10:00
Max Cahill
66a9f41474
[modified] renamed to batteries, added global export suppression and more documentation
2020-03-15 20:28:50 +11:00