Class Color#
main - nodes - nodes menus
Color DataSocket
Args:#
value (float, triplet, DataSocket): Initial value
label (str): Node label
Color exposes properties: red
, green
and blue
, hue
, value
, ‘lightness, 'saturation
and alpha
:
c = Color()
c.red = .5
c.saturation = .2
Color supports some operators:
Operator |
Mix mode |
Method |
---|---|---|
|
ADD |
|
|
MULTIPLY |
|
|
DIFFERENCE |
|
|
DIVIDE |
|
|
MIX |
Constructor#
Color(self, value=None, label=None)
Content#
Properties
alpha | blue | green | hue | lightness | red | rgb_curves | saturation | separate_HSL | separate_HSV | separate_RGB | value
Inherited
bl_idname | bnode | is_multi_input | is_output | is_plugged | links | name | node_chain_label | socket_index
Class and static methods
Color | HSL | HSV | Input | RGB
Inherited
get_bl_idname | get_class_name | gives_bsocket | is_socket | is_vector | python_type_to_socket | value_data_type
Methods
brighter | darker | equal | get_blender_socket | mix | mix_add | mix_burn | mix_color | mix_darken | mix_difference | mix_divide | mix_dodge | mix_hue | mix_lighten | mix_linear_light | mix_multiply | mix_overlay | mix_saturation | mix_screen | mix_soft_light | mix_subtract | mix_value | separate_color | switch
Inherited
connected_sockets | get_blender_socket | init_domains | init_socket | plug | reroute | reset_properties | stack | to_output
Properties#
alpha#
Alpha compenent
Go to top - main - nodes - nodes menus
blue#
Blue compenent
Go to top - main - nodes - nodes menus
green#
Green compenent
Go to top - main - nodes - nodes menus
hue#
Hue compenent
Go to top - main - nodes - nodes menus
lightness#
Lightness compenent
Go to top - main - nodes - nodes menus
red#
Red compenent
Go to top - main - nodes - nodes menus
rgb_curves#
Node: RGB Curves | Blender reference | api reference
Returns:#
node with sockets [‘color’]
Go to top - main - nodes - nodes menus
saturation#
Saturation compenent
Go to top - main - nodes - nodes menus
separate_HSL#
Separate HSL
Returns:#
node with sockets hue, saturation, lightness, alpha
Go to top - main - nodes - nodes menus
separate_HSV#
Separate HSV
Returns:#
node with sockets hue, saturation, value, alpha
Go to top - main - nodes - nodes menus
separate_RGB#
Separate RGB
Returns:#
node with sockets red, green, blue, alpha
Go to top - main - nodes - nodes menus
value#
Value compenent
Go to top - main - nodes - nodes menus
Class and static methods#
Color#
@classmethod
def Color(cls)
Node: Color | Blender reference | api reference
Returns:#
socket
color
Go to top - main - nodes - nodes menus
HSL#
@classmethod
def HSL(cls, hue=None, saturation=None, lightness=None, alpha=None)
Node: Combine Color | Blender reference | api reference
Args:#
hue: Float
saturation: Float
lightness: Float
alpha: Float
Returns:#
socket
color
Go to top - main - nodes - nodes menus
HSV#
@classmethod
def HSV(cls, hue=None, saturation=None, value=None, alpha=None)
Node: Combine Color | Blender reference | api reference
Args:#
hue: Float
saturation: Float
value: Float
alpha: Float
Returns:#
socket
color
Go to top - main - nodes - nodes menus
Input#
@classmethod
def Input(cls, value=None, name = "Color", description = "")
Create a Color input socket in the Group Input Node
Args:#
value: The default value
name: The socket name
description: User tip
Returns:#
Color: The Color data socket
Go to top - main - nodes - nodes menus
RGB#
@classmethod
def RGB(cls, red=None, green=None, blue=None, alpha=None)
Node: Combine Color | Blender reference | api reference
Args:#
red: Float
green: Float
blue: Float
alpha: Float
Returns:#
socket
color
Go to top - main - nodes - nodes menus
Methods#
brighter#
def brighter(self, b=None)
Node: Compare | Blender reference | api reference
Args:#
b: [‘Float’, ‘Integer’, ‘Vector’, ‘Color’, ‘String’]
Returns:#
socket
result
Go to top - main - nodes - nodes menus
darker#
def darker(self, b=None)
Node: Compare | Blender reference | api reference
Args:#
b: [‘Float’, ‘Integer’, ‘Vector’, ‘Color’, ‘String’]
Returns:#
socket
result
Go to top - main - nodes - nodes menus
equal#
def equal(self, b=None, epsilon=None)
Node: Compare | Blender reference | api reference
Args:#
b: [‘Float’, ‘Integer’, ‘Vector’, ‘Color’, ‘String’]
epsilon: Float
Returns:#
socket
result
Go to top - main - nodes - nodes menus
get_blender_socket#
def get_blender_socket(self)
Overrides the standard behavior of :class:DataSocket super class
If the r
, g
, b
properties have been read or modified, a Combine RGB node is necessary
to recompose the Color.
Blender reference : ShaderNodeCombineRGB
Go to top - main - nodes - nodes menus
mix#
def mix(self, factor=None, color=None, blend_type='MIX', clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
blend_type (str): ‘MIX’ in [MIX, DARKEN, MULTIPLY, BURN, LIGHTEN,… , SATURATION, COLOR, VALUE]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_add#
def mix_add(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_burn#
def mix_burn(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_color#
def mix_color(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_darken#
def mix_darken(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_difference#
def mix_difference(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_divide#
def mix_divide(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_dodge#
def mix_dodge(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_hue#
def mix_hue(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_lighten#
def mix_lighten(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_linear_light#
def mix_linear_light(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_multiply#
def mix_multiply(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_overlay#
def mix_overlay(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_saturation#
def mix_saturation(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_screen#
def mix_screen(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_soft_light#
def mix_soft_light(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_subtract#
def mix_subtract(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
mix_value#
def mix_value(self, factor=None, color=None, clamp_factor=True, clamp_result=False)
Node: Mix | Blender reference | api reference
Args:#
factor: [‘Float’, ‘Vector’]
color: [‘Float’, ‘Vector’, ‘Color’]
clamp_factor (bool): True
clamp_result (bool): False
Returns:#
socket
result
Go to top - main - nodes - nodes menus
separate_color#
def separate_color(self, mode='RGB')
Node: Separate Color | Blender reference | api reference
Args:#
mode (str): ‘RGB’ in [RGB, HSV, HSL]
Returns:#
node with sockets [‘red’, ‘green’, ‘blue’, ‘alpha’]
Go to top - main - nodes - nodes menus
switch#
def switch(self, switch=None, true=None)
Node: Switch | Blender reference | api reference
Args:#
switch: Boolean
true: Color
Returns:#
socket
output
Go to top - main - nodes - nodes menus