Note Colors#
- class fretboardgtr.note_colors.NoteColors[source]#
Bases:
ConfigIniterDataclass containing the mapping of colors and intervals.
- __init__(root='rgb(231, 0, 0)', minor_second='rgb(249, 229, 0)', major_second='rgb(249, 165, 0)', minor_third='rgb(0, 94, 0)', major_third='rgb(0, 108, 0)', perfect_fourth='rgb(0, 154, 0)', diminished_fifth='rgb(0, 15, 65)', perfect_fifth='rgb(0, 73, 151)', minor_sixth='rgb(168, 107, 98)', major_sixth='rgb(222, 81, 108)', minor_seventh='rgb(120, 37, 134)', major_seventh='rgb(120, 25, 98)')[source]#
- Parameters:
root (str) –
minor_second (str) –
major_second (str) –
minor_third (str) –
major_third (str) –
perfect_fourth (str) –
diminished_fifth (str) –
perfect_fifth (str) –
minor_sixth (str) –
major_sixth (str) –
minor_seventh (str) –
major_seventh (str) –
- Return type:
None
- from_interval(interval)[source]#
Get color for the given long interval name.
- Parameters:
interval (str) – String representing the long interval
- Returns:
RGB color as string
- Return type:
str
Example
from fretboardgtr.constants import LongInterval >>> NoteColors().from_short_interval(LongInterval.MINOR_SIXTH) “rgb(168, 107, 98)”
- from_short_interval(interval)[source]#
Get color for the given short interval.
- Parameters:
interval (str) – String representing the interval
- Returns:
RGB color as string
- Return type:
str
Example
from fretboardgtr.constants import Interval >>> NoteColors().from_short_interval(Interval.MINOR_SIXTH) “rgb(168, 107, 98)”