← Back to team overview

yade-users team mailing list archive

[Question #681022]: change color

 

New question #681022 on Yade:
https://answers.launchpad.net/yade/+question/681022

hello

I want to color the particles by region.But I found that only the combination of 255 and 0 can change color,such as (255, 0, 255)(0, 255, 255)(0,0,0).If I use other combination ,the color will be white.Is it because yade only shows a few colors?

I would appreciate if you can help me

James

##########
for b in O.bodies:
        	if isinstance(b.shape,Sphere): 
			if b.state.pos[2]>0 and b.state.pos[2]<cut*0.25:
				if b.state.pos[1]>0 and b.state.pos[1]<((ylength)*0.25):
					b.shape.color=(108, 51, 101)
				elif b.state.pos[1]>((ylength)*0.25) and b.state.pos[1]<((ylength)*0.5):
					b.shape.color=(72, 72, 147)
				

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.