Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!helios.ee.lbl.gov!ncis.tis.llnl.gov!lll-winken!uunet!microsoft!brianw From: brianw@microsoft.UUCP (Brian Willoughby) Newsgroups: comp.sys.apple Subject: Re: Apple IIgs SHR fade Summary: Idea for fade algorithm Keywords: fade, IIgs, SHR Message-ID: <5770@microsoft.UUCP> Date: 21 May 89 23:22:20 GMT References: <11472@bloom-beacon.MIT.EDU> <30927@apple.Apple.COM> <2808@puff.cs.wisc.edu> <2335@wpi.wpi.edu> Reply-To: brianw@microsoft.UUCP (Brian Willoughby) Distribution: usa Organization: Microsoft Corp., Redmond WA Lines: 22 In article <2335@wpi.wpi.edu> dseah@wpi.wpi.edu (David I Seah) writes: >I was wondering if that algorithm would cause color distortion myself. Would >you have to lower each one of red,green, and blue color components >proportionally so that they all zeroed out at the same time? > >In a word, please post it! :) > >Dave Seah (dseah@wpi.wpi.edu) Here is an idea for a fade algorithm that should be fairly simple: Seems like you could look at the pallette color register that you want to reduce, and then choose the component with the lowest value. Then multiply each of the RGB components by a fraction which would effectively decrement the smallest component. For example. if R=100, B=78 and G=90, then multiply each component by 77/78. Of course, since I don't have a GS, I can't predict how much rounding error would mess up this approach. Perhaps someone could send me a II GS, and I could try it out? Brian Willoughby ...!uw-beaver!microsoft!brianw or microsoft!brianw@uunet.UU.NET or just brianw@microsoft.UUCP