porescene.color package¶
Subpackages¶
- porescene.color.palette package
- Submodules
- Module contents
ColormapColormap.ACCENTColormap.ACTONColormap.ACTONSColormap.ALGAEColormap.AMPColormap.BALANCEColormap.BAMColormap.BAMAKOColormap.BAMAKOSColormap.BAMOColormap.BATLOWColormap.BATLOWKColormap.BATLOWKSColormap.BATLOWSColormap.BATLOWWColormap.BATLOWWSColormap.BERLINColormap.BGYColormap.BGYWColormap.BILBAOColormap.BILBAOSColormap.BJYColormap.BKRColormap.BKYColormap.BLUESColormap.BMWColormap.BMYColormap.BRBGColormap.BROCColormap.BROCOColormap.BUDAColormap.BUDASColormap.BUGNColormap.BUKAVUColormap.BUPUColormap.BWYColormap.CIVIDISColormap.COLORWHEELColormap.COOLWARMColormap.CORKColormap.CORKOColormap.CUBEHELIXColormap.CURLColormap.CWRColormap.DARK2Colormap.DAVOSColormap.DAVOSSColormap.DEEPColormap.DELTAColormap.DENSEColormap.DEVONColormap.DEVONSColormap.DIFFColormap.DIMGRAYColormap.EMBERColormap.FESColormap.FIREColormap.GLASGOWColormap.GLASGOWSColormap.GNBUColormap.GOULDIANColormap.GRAYColormap.GRAYCColormap.GRAYCSColormap.GREENSColormap.GREYSColormap.GWVColormap.HALINEColormap.HAWAIIColormap.HAWAIISColormap.ICEColormap.IMOLAColormap.IMOLASColormap.INFERNOColormap.ISOLUMColormap.KBColormap.KBCColormap.KBGYWColormap.KGColormap.KGYColormap.KRColormap.LAJOLLAColormap.LAJOLLASColormap.LAPAZColormap.LAPAZSColormap.LIPARIColormap.LIPARISColormap.LISBONColormap.MAGMAColormap.MANAGUAColormap.MATTERColormap.NAVIAColormap.NAVIASColormap.NUUKColormap.NUUKSColormap.OLERONColormap.ORANGESColormap.ORRDColormap.OSLOColormap.OSLOSColormap.OXYColormap.PAIREDColormap.PASTEL1Colormap.PASTEL2Colormap.PHASEColormap.PIYGColormap.PLASMAColormap.PRGNColormap.PUBUColormap.PUBUGNColormap.PUORColormap.PURDColormap.PURPLESColormap.RAINColormap.RAINBOWColormap.RAINBOW4Colormap.RDBUColormap.RDGYColormap.RDPUColormap.RDYLBUColormap.RDYLGNColormap.REDSColormap.ROMAColormap.ROMAOColormap.SET1Colormap.SET2Colormap.SET3Colormap.SOLARColormap.SPECTRALColormap.SPEEDColormap.TAB10Colormap.TARNColormap.TEMPOColormap.THERMALColormap.TOFINOColormap.TOKYOColormap.TOKYOSColormap.TOPOColormap.TURBIDColormap.TURBOColormap.TURKUColormap.TURKUSColormap.TWILIGHTColormap.VANIMOColormap.VIKColormap.VIKOColormap.VIRIDISColormap.YLGNColormap.YLGNBUColormap.YLORBRColormap.YLORRD
Palette
Submodules¶
Module contents¶
- class porescene.color.Color(h='#000')[source]¶
Bases:
objectSimple representation of a color.
- Parameters:
hexstr – HEX color string
Examples
Suppose you have two :class:
Colorinstances, just mix them by literal addition operation+:- Example:
>>> blue = Color('#00f') >>> red = Color('#f00') >>> purple = red + blue >>> print(purple)
Be aware that all properties of the color, which includes alpha, will be mixed.
- mix(other, ratio=0.5)[source]¶
Create a new color by mixing the current instance with others.
- Parameters:
other (
Self) – The color to mix with.ratio (
float) – The amount of color other to mix to the current instance.space – The colorspace to use for mixing the colors. Mixing in RGB space is subtractive, while Lab is additive. Lab mixes more accurate but still does not reach real color mixing results.
- Return type:
- property lnrgb: tuple[float, float, float]¶
Returns current color in normalized values fom linear RGB color space.
- property nrgb: tuple[float, float, float]¶
Returns current color in normlized values (interval [0, 1]) from sRGB color space.
- property nrgba: tuple[float, float, float, float]¶
Returns current color in normlized values (interval [0, 1]) from sRGBA color space.