List conditions in PythonScript

Hello every body,

I need some help to finalize a dynamo script.
Please could some one help me ?
Thank you

This is what i’m trying to do :

This is the Python Script :

import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

dataEnteringNode = IN

list = IN[0]

for j in range(len(0,list)):

if j == 1 :	
	r=255
	g=0
	b=0
	
if j == 2 :	
	r=255
	g=128
	b=64
	
if j == 3 :	
	r=0
	g=255
	b=0
	
if j == 4 :	
	r=0
	g=255
	b=255

#Assign your output to the OUT variable.
OUT = (r,g,b)

Hi,

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
clr.AddReference('DSCoreNodes')
import DSCore
from DSCore import Color

OUT = []
for j in range(0,len(IN[0])):
	if j == 1 :	
		OUT.append(DSCore.Color.ByARGB(255,255,0,0))
	elif j == 2 :	
		OUT.append(DSCore.Color.ByARGB(255,255,128,64))
	elif j == 3 :	
		OUT.append(DSCore.Color.ByARGB(255,0,255,0))
	elif j == 4 :	
		OUT.append(DSCore.Color.ByARGB(255,0,255,255))

Tomasz_Puchala, erfajo , thanks a lot.
That is exactely what i amlooking for !