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

Add operators for types #2

Open
fnky opened this issue Aug 9, 2015 · 0 comments
Open

Add operators for types #2

fnky opened this issue Aug 9, 2015 · 0 comments

Comments

@fnky
Copy link
Owner

fnky commented Aug 9, 2015

It should be possible to compare types in Chroma. Such as ColorTint e.g.

var a: ColorTint = ColorTint(...)
var b: ColorTint = ColorTint(...)

Perhaps be able to merge as well

Addition

Add component a.startColor to b.startColor, and (if not nil) a.endColor to b.endColor.

var c: ColorTint = a + b

Subtraction

Subtract component a.startColor from b.startColor, and (if not nil) a.endColor from b.endColor.

var c: ColorTint = a - b

Compare

Compare hash values between component a and b. If they're equal return true, otherwise false.

var isEqual: Bool = a == b
var notEqual: Bool = a != b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant