Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Day 001: _GREEN32
#4
A couple of very handy subs use _Green32 ( and red and blue and alpha), Ink~& is finding in-between colors between 2 color ranges :
Code: (Select All)
Sub cAnalysis (c As _Unsigned Long, outRed, outGrn, outBlu, outAlp)
    outRed = _Red32(c): outGrn = _Green32(c): outBlu = _Blue32(c): outAlp = _Alpha32(c)
End Sub

Function Ink~& (c1 As _Unsigned Long, c2 As _Unsigned Long, fr##)
    Dim R1, G1, B1, A1, R2, G2, B2, A2
    cAnalysis c1, R1, G1, B1, A1
    cAnalysis c2, R2, G2, B2, A2
    Ink~& = _RGB32(R1 + (R2 - R1) * fr##, G1 + (G2 - G1) * fr##, B1 + (B2 - B1) * fr##, A1 + (A2 - A1) * fr##)
End Function

Used in most recent Winter Banner posts!
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
Day 001: _GREEN32 - by SMcNeill - 11-06-2022, 02:33 PM
RE: Day 001: _GREEN32 - by Pete - 11-06-2022, 06:52 PM
RE: Day 001: _GREEN32 - by PhilOfPerth - 11-07-2022, 12:33 AM
RE: Day 001: _GREEN32 - by bplus - 11-07-2022, 07:23 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)