public AbstractColor hue(double degreeModifier) { CIELCh a = this.toCIELCh(); a.h += degreeModifier; return(a[this.toSelf]); }
public List <AbstractColor> rectangle(int sideLength, bool includeSelf) { int side1 = sideLength; int side2 = (360 - (sideLength * 2)) / 2; CIELCh current = this.toCIELCh(); List <AbstractColor> rtn = new List <AbstractColor>(); rtn.Add(new CIELCh(current.l, current.c, current.h + side1)[this.toSelf]); rtn.Add(new CIELCh(current.l, current.c, current.h + side1 + side2)[this.toSelf]); rtn.Add(new CIELCh(current.l, current.c, current.h + side1 + side2)[this.toSelf]); if (includeSelf) { rtn.Insert(0, this); } return(rtn); }
public List <AbstractColor> equal(int parts, bool includeSelf) { if (parts < 2) { parts = 2; } CIELCh current = this.toCIELCh(); double distance = 360 / parts; List <AbstractColor> palette = new List <AbstractColor>(); if (includeSelf) { palette.Add(this); } for (int i = 1; i < parts; i++) { palette.Add(new CIELCh(current.l, current.c, current.h + (distance * i))[this.toSelf]); } return(palette); }