Color type definitions and constants for matplotlib-compatible color support
Provides: - Unified color type with RGBA support - Named color constants (CSS4/matplotlib standard) - Single letter color mappings - Utility functions for color validation
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | NUM_NAMED_COLORS | = | 20 | |
| character(len=12), | public, | parameter | :: | named_color_names(NUM_NAMED_COLORS) | = | ['red ', 'green ', 'blue ', 'cyan ', 'magenta ', 'yellow ', 'black ', 'white ', 'gray ', 'orange ', 'purple ', 'brown ', 'pink ', 'olive ', 'navy ', 'lime ', 'teal ', 'silver ', 'maroon ', 'indigo '] | |
| real(kind=wp), | public, | parameter | :: | named_color_values(3,NUM_NAMED_COLORS) | = | reshape([1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.5_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 1.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 1.0_wp, 0.5_wp, 0.5_wp, 0.5_wp, 1.0_wp, 0.647_wp, 0.0_wp, 0.5_wp, 0.0_wp, 0.5_wp, 0.647_wp, 0.165_wp, 0.165_wp, 1.0_wp, 0.753_wp, 0.796_wp, 0.5_wp, 0.5_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.5_wp, 0.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 0.5_wp, 0.5_wp, 0.753_wp, 0.753_wp, 0.753_wp, 0.5_wp, 0.0_wp, 0.0_wp, 0.294_wp, 0.0_wp, 0.51_wp], [3, NUM_NAMED_COLORS]) | |
| character(len=1), | public, | parameter | :: | single_letters(8) | = | ['r', 'g', 'b', 'c', 'm', 'y', 'k', 'w'] | |
| integer, | public, | parameter | :: | letter_to_named(8) | = | [1, 2, 3, 4, 5, 6, 7, 8] | 
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | public | :: | r | = | 0.0_wp | ||
| real(kind=wp), | public | :: | g | = | 0.0_wp | ||
| real(kind=wp), | public | :: | b | = | 0.0_wp | ||
| real(kind=wp), | public | :: | a | = | 1.0_wp | ||
| logical, | public | :: | valid | = | .false. | 
Clamp value to [0,1] range
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | value | 
Convert string to lowercase in-place
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=:), | intent(inout), | allocatable | :: | str | 
Convert single character to lowercase
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=1), | intent(inout) | :: | char |