on master help sign in
rename "make240ColorCodeFromRGB" to "rgbColorToColor240"
commit1125b2fb117edc8fe8e40c68bf0fd83de739e6e1 authorColby Jenn <colbymjenn@gmail.com> dateWed 26 Jun 2019, 00:23 (7 years ago) parent800336f
2 files changed+4−4
src/Graphics/Vty/Attributes/Color.hs+1−1 src/Graphics/Vty/Attributes/Color240.hs+3−3
src/Graphics/Vty/Attributes/Color.hs+1−1
@@ -124,4 +124,4 @@ brightWhite = ISOColor 15
124124-- This function is lossy in the sense that we only internally support 240 colors but the
125125-- #RRGGBB format supports 16^3 colors.
126126rgbColor :: Integral i => i -> i -> i -> Color
127−rgbColor r g b = Color240 (make240ColorCodeFromRGB r g b)
127+rgbColor r g b = Color240 (rgbColorToColor240 r g b)
src/Graphics/Vty/Attributes/Color240.hs+3−3
@@ -1,6 +1,6 @@
11-- This header file was generated by ./256colres.pl
22module Graphics.Vty.Attributes.Color240
3− ( make240ColorCodeFromRGB
3+ ( rgbColorToColor240
44 , color240CodeToRGB
55 )
66where
@@ -12,8 +12,8 @@ import Text.Printf
1212-- 256colres.pl which is forked from xterm 256colres.pl.
1313
1414-- | Create a value in the Color240 set from an RGB triple
15−make240ColorCodeFromRGB :: Integral i => i -> i -> i -> Word8
16−make240ColorCodeFromRGB r g b
15+rgbColorToColor240 :: Integral i => i -> i -> i -> Word8
16+rgbColorToColor240 r g b
1717 | r < 0 && g < 0 && b < 0 = error "rgbColor with negative color component intensity"
1818 | r == 8 && g == 8 && b == 8 = 216
1919 | r == 18 && g == 18 && b == 18 = 217