Jump to content

tint property in PIXI.Graphics


Recommended Posts


This is from examples, I modified it. So we have here only one shape and only one color but  tint is not working 

var renderer = PIXI.autoDetectRenderer(800, 600, { antialias: true });

var stage = new PIXI.Container();

var graphics = new PIXI.Graphics();

graphics.beginFill(0xFF700B, 1);
graphics.drawRect(50, 250, 120, 120);
graphics.tint = 4*0xFFFFFF;

// run the render loop

function animate() {

    requestAnimationFrame( animate );


Link to comment
Share on other sites

1 hour ago, ivan.popelyshev said:

What is "4 * 0xFFFFFF " ? Do you want it to somehow lighten the colors?

In fact, that's a meaningless thing which I wrote without thinking much. And it was the whole problem, the color must be in range of 000000 to ffffff , why would I try to get more than ffffff. My fault. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...