vaab / colour

Python color representations manipulation library (RGB, HSL, web, ...)
BSD 2-Clause "Simplified" License
319 stars 41 forks source link

Using named tuples #22

Closed pradyunsg closed 2 years ago

pradyunsg commented 8 years ago

Currently, All attributes and methods of Color return tuples or strings. It should be relatively simple to return namedtuples instead of simple tuples.

Why? _Namedtuple makes your tuples _self-document. You can easily understand what is going on by having a quick glance at your code.1

pradyunsg commented 8 years ago

Bump.

vaab commented 8 years ago

This is an excellent suggestion. Sorry for the late answer, this got lost and stuck between my actual intention to release other stuff containing already this part. Although, if any PR would pop in and that it pass the basic requirements, I'll accept it with pleasure.

Sorry again for this overly late answer anyway.

pradyunsg commented 8 years ago

Great. If and when I get the time to do this, I'll shoot a PR.

pradyunsg commented 7 years ago

If someone else is interested in doing this, please do.

sayeghr commented 6 years ago

Hi @vaab, should this issue be considered closed?

pradyunsg commented 2 years ago

Closing since it looks like it got solved.