jasonsturges Posted September 4, 2019 Share Posted September 4, 2019 Hi, my color values are off when rendering with Pixi.js For example, here I have a fill with #3984c5, but am getting #4c84c0 on render. const app = new PIXI.Application({}); document.body.appendChild(app.view); var graphics = new PIXI.Graphics(); app.stage.addChild(graphics); graphics.beginFill(0x3984c5) graphics.drawRect(50, 50, 200, 200); graphics.endFill https://codepen.io/jasonsturges/pen/PoYOdag Perhaps 8-bit vs 16-bit, but my Pixi.js app colors are not matching the source Flash application being ported. Something I'm missing, or not possible? Thanks ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 4, 2019 Share Posted September 4, 2019 Gama correction. Pixi, as every other webgl or canvas2d app, as Flash apps uses sRGB 0x3984c5 . I dont know how did you get another color in Flash. However, if you open a screen in photoshop or something like that, the tool can report you linearRGB color number instead. > Perhaps 8-bit vs 16-bit, but my Pixi.js app colors are not matching the source Flash application being ported. Are you sure they dont match on graphics and not something like PNG image? Also, make sure your flash app doesnt have ColorMatrixFilter somewhere that you forgot about. Quote Link to comment Share on other sites More sharing options...
jasonsturges Posted September 5, 2019 Author Share Posted September 5, 2019 Appreciate the insight - thanks, @ivan.popelyshev ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 5, 2019 Share Posted September 5, 2019 Welcome to the forums! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.