diff --git a/colorhash/cli.py b/colorhash/cli.py index 57ca02f..b8c5f07 100644 --- a/colorhash/cli.py +++ b/colorhash/cli.py @@ -8,7 +8,7 @@ import textwrap from .colorizer import PaletteColorizer from .matricizer import Matricizer, NibbleMatricizer, RandomartMatricizer from .palettes import Palette, DEFAULT_PALETTES, PALETTES -from .writer import ANSIWriter, SVGWriter +from .writer import ANSIWriter, SVGWriter, Writer # TODO - WASM compile for embedding directly in HTML diff --git a/colorhash/color.py b/colorhash/color.py index 2248410..4af4e11 100644 --- a/colorhash/color.py +++ b/colorhash/color.py @@ -10,6 +10,7 @@ class Color(metaclass=abc.ABCMeta): This can be used to convert any color format into another color format. """ + @abc.abstractmethod def to_html_color(self) -> str: """ Convert this color to an HTML color. diff --git a/colorhash/palettes.py b/colorhash/palettes.py index 7e14681..7403eb8 100644 --- a/colorhash/palettes.py +++ b/colorhash/palettes.py @@ -6,7 +6,7 @@ from .color import Color, HSLColor HSLRange = range | float | int | list[float | int] -Palette = Sequence[str] +Palette = Sequence[Color] def quantize(r: range, steps: int = 16) -> list[float]: