Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/webcolors/__init__.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

7 statements  

1""" 

2Functions for working with the color names and color value formats defined by the 

3HTML and CSS specifications for use in documents on the web. 

4 

5See documentation (in docs/ directory of source distribution) for details of the 

6supported formats, conventions and conversions. 

7 

8""" 

9 

10# SPDX-License-Identifier: BSD-3-Clause 

11 

12from ._conversion import ( 

13 hex_to_name, 

14 hex_to_rgb, 

15 hex_to_rgb_percent, 

16 name_to_hex, 

17 name_to_rgb, 

18 name_to_rgb_percent, 

19 rgb_percent_to_hex, 

20 rgb_percent_to_name, 

21 rgb_percent_to_rgb, 

22 rgb_to_hex, 

23 rgb_to_name, 

24 rgb_to_rgb_percent, 

25) 

26from ._definitions import CSS2, CSS3, CSS21, HTML4, names 

27from ._html5 import ( 

28 html5_parse_legacy_color, 

29 html5_parse_simple_color, 

30 html5_serialize_simple_color, 

31) 

32from ._normalization import ( 

33 normalize_hex, 

34 normalize_integer_triplet, 

35 normalize_percent_triplet, 

36) 

37from ._types import HTML5SimpleColor, IntegerRGB, IntTuple, PercentRGB, PercentTuple 

38 

39__version__ = "24.8.0" 

40 

41__all__ = [ 

42 "HTML4", 

43 "CSS2", 

44 "CSS21", 

45 "CSS3", 

46 "name_to_hex", 

47 "name_to_rgb", 

48 "name_to_rgb_percent", 

49 "hex_to_name", 

50 "hex_to_rgb", 

51 "hex_to_rgb_percent", 

52 "names", 

53 "rgb_to_hex", 

54 "rgb_to_name", 

55 "rgb_to_rgb_percent", 

56 "rgb_percent_to_hex", 

57 "rgb_percent_to_name", 

58 "rgb_percent_to_rgb", 

59 "html5_parse_simple_color", 

60 "html5_parse_legacy_color", 

61 "html5_serialize_simple_color", 

62 "normalize_hex", 

63 "normalize_integer_triplet", 

64 "normalize_percent_triplet", 

65 "IntegerRGB", 

66 "PercentRGB", 

67 "HTML5SimpleColor", 

68 "IntTuple", 

69 "PercentTuple", 

70]