Note Colors#

class fretboardgtr.note_colors.NoteColors[source]#

Bases: ConfigIniter

Dataclass 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

diminished_fifth: str = 'rgb(0, 15, 65)'[source]#
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)”

major_second: str = 'rgb(249, 165, 0)'[source]#
major_seventh: str = 'rgb(120, 25, 98)'[source]#
major_sixth: str = 'rgb(222, 81, 108)'[source]#
major_third: str = 'rgb(0, 108, 0)'[source]#
minor_second: str = 'rgb(249, 229, 0)'[source]#
minor_seventh: str = 'rgb(120, 37, 134)'[source]#
minor_sixth: str = 'rgb(168, 107, 98)'[source]#
minor_third: str = 'rgb(0, 94, 0)'[source]#
perfect_fifth: str = 'rgb(0, 73, 151)'[source]#
perfect_fourth: str = 'rgb(0, 154, 0)'[source]#
root: str = 'rgb(231, 0, 0)'[source]#