<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 19.12.2013, at 18:06, Nicolas Cellier &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div dir="ltr"><div><div><div><div>I know the answer, we have 30 bits available for keeping the rgb instance variable as SmallInteger...<br></div><div>So it's the best we can do, while keeping an efficient format.<br><br>
</div>But we are never using 10 bits for each component, for 32 bits image only 8 bit by color are used.<br></div>Since nowadays most Forms are 32 bits deep, this force useless conversions where we could have none.<br><br>
</div><div>I see that Pharo 3.0 did unify Color and TranslucentColor by moving the alpha information in Color.<br></div><div>But did not change the rgb ComponentMax... Any reason why?<br></div><div><br></div>If we encoded rgb component on 8 bits, and reverted the alpha channel encoding, then we could have colors pre-encoded on 32 bits, but most using only 24 bits (because most are opaque) would be represented as SmallInteger.<br>
</div><div>But I don't know if it is really inter-operable, or more natural...<br><br></div><div>Juan followed another path for Cuis, opting for float components, which is another possibility, but our VM are not yet optimized for handling Floats...<br>
<br></div><div>Thoughts?</div></div></div></blockquote><br></div><div>All opaque colors would be LargeIntegers, not SmallIntegers: 16rFFxxxxxx.</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; font-family: 'Lucida Grande'; font-size: 12px;"><div style="font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Helvetica; ">- Bert -</span></div><br class="Apple-interchange-newline"></span>

</div>
<br></body></html>