Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev(hansbug): update documentation for hbutils.color.model #38

Merged
merged 3 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/source/api_doc/color/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,26 @@ Color
.. autoclass:: Color
:members: __init__, alpha, rgb, hsv, hls, __repr__, __str__, __getstate__, __setstate__, __hash__, __eq__, from_rgb, from_hex, from_hls, from_hsv


RGBColorProxy
-------------------

.. autoclass:: RGBColorProxy
:members: __init__, red, green, blue, __iter__, __repr__


HLSColorProxy
-------------------

.. autoclass:: HLSColorProxy
:members: __init__, hue, saturation, lightness, __iter__, __repr__


HSVColorProxy
-------------------

.. autoclass:: HSVColorProxy
:members: __init__, hue, saturation, value, brightness, __iter__, __repr__



5 changes: 5 additions & 0 deletions hbutils/color/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@
"yellowgreen": "#9acd32",
}

_CSS3_NAME_MAPS = {
value.lower(): key
for key, value in _CSS3_COLOR_MAPS.items()
}


def _name_to_hex(name: str) -> str:
"""
Expand Down
Loading