ScratchData LogoScratchData
Back to Scratch-Minion's profile

More on Transparent Colours

SCScratch-Minion•Created April 11, 2018
More on Transparent Colours
32
23
455 views
View on Scratch

Instructions

Use the Transparency Slider to change the transparency of the cube faces from 0% (not transparent) to 100% transparent. Also change the background colour. Note that only changing the background colour changes the colours you see as the cube has transparent faces. This is especially obvious for higher transparency values. The cube rotates automatically about the Y axis. <Up Arrow> & <Down Arrow> keys to rotate cube about the X axis. <a> and <z> keys to rotate cube about the Z axis. Try key combinations to rotate about several axes simultaneously.

Description

3D Tutorial Studio: https://scratch.mit.edu/studios/5040029/ An Example How Scratch 2.0 Transparent Colours are Calculated ---------------------------------------------------------------------------------------- If an ARGB colour has A=128 it is 50% transparent. ARGB and RGB colour are described in the tutorial in the earlier tutorial project https://scratch.mit.edu/projects/219615335/ Suppose we look through colour A 128 R 200 G 0 B 200 at a colour underneath R 0 G 64 B 100 As the top colour is 50% transparent, we see half of each colour. Scratch averages the R G B components of the two colours and we see the colour R 100 G 32 B 150 For other transparency values eg. 64 or 25%, Scratch calculates a weighted average eg. 3/4 of each top colour component and 1/4 of the colour below. Additive and Subtractive Colour ------------------------------------------- I have yet to write about Additive and Subtractive Colour in the tutorials so here are some quick notes: Subtractive Colour mixing is like mixing paint. We see blue paint because other colours are absorbed and only blue light is reflected. Mixing Blue and Yellow gives Green. Mixing all colours gives black. Additive Colours mix beams of different coloured light. Mixing all colours gives white. Computer Monitors and Television Screens use Additive Colour. A really good magnifying glass would show that each pixel on the screen is actually made up of smaller red, blue and green "pixels". Mixing Blue and Yellow gives a type of Gray. Computers use Additive Colour Mixing so when combining colours you do not get colours like when mixing paint. ------------------------------------------------------------- Huge thanks to @TheLogFather for his "Raster-Fill Convex Quad" custom block from https://scratch.mit.edu/projects/62499800/ that fills a convex quadrilateral uniformly with colour. Theory to rotate a 3D object from Wikipedia https://en.wikipedia.org/wiki/Rotation_matrix

Project Details

Project ID215605594
CreatedApril 11, 2018
Last ModifiedMay 1, 2018
SharedMay 1, 2018
Visibilityvisible
CommentsAllowed