<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=LaTeX%2FC3%2FDefining-Colours-and-Environments%2FEnglish</id>
		<title>LaTeX/C3/Defining-Colours-and-Environments/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=LaTeX%2FC3%2FDefining-Colours-and-Environments%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=LaTeX/C3/Defining-Colours-and-Environments/English&amp;action=history"/>
		<updated>2026-04-26T13:54:52Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=LaTeX/C3/Defining-Colours-and-Environments/English&amp;diff=57213&amp;oldid=prev</id>
		<title>Ketkinaina: Created page with &quot;'''Title of the script: Defining Colours and Environments '''  '''Authors: Ambika Vanchinathan'''  '''Keywords: '''LaTeX, xcolor package, colorbox, fcolorbox, definecolor, row...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=LaTeX/C3/Defining-Colours-and-Environments/English&amp;diff=57213&amp;oldid=prev"/>
				<updated>2025-11-12T11:06:00Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Title of the script: Defining Colours and Environments &amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Authors: Ambika Vanchinathan&amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Keywords: &amp;#039;&amp;#039;&amp;#039;LaTeX, xcolor package, colorbox, fcolorbox, definecolor, row...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Title of the script: Defining Colours and Environments '''&lt;br /&gt;
&lt;br /&gt;
'''Authors: Ambika Vanchinathan'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: '''LaTeX, xcolor package, colorbox, fcolorbox, definecolor, rowcolors, RGB, CMYK, HTML color, video tutoria&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|-&lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 1'''&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
|| Welcome to this spoken tutorial on '''Defining Colours and Environments'''.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 2'''&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|| In this tutorial, we will learn to:&lt;br /&gt;
* Create boxes with colours and borders&lt;br /&gt;
* Define custom colors using '''RGB''', '''CMYK''', '''HTML''', and other models and&lt;br /&gt;
* Apply colours to table rows&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 3'''&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
* '''Linux Mint OS version 21.3'''&lt;br /&gt;
* '''TeXworks version 0.6.6'''&lt;br /&gt;
|| To record this tutorial I’m using the following setup. &lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 4'''&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
|| To follow this tutorial, learners should have basic knowledge of''' LaTeX'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 5'''&lt;br /&gt;
&lt;br /&gt;
'''Code files'''&lt;br /&gt;
&lt;br /&gt;
The following code file is required to practice this tutorial:&lt;br /&gt;
&lt;br /&gt;
1. '''xcolor-eg.tex'''&lt;br /&gt;
&lt;br /&gt;
This file is provided in the Code Files link of this tutorial page.&lt;br /&gt;
|| The following code file is required to practice this tutorial.&lt;br /&gt;
&lt;br /&gt;
This file is provided in the '''Code Files''' link of this tutorial page.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let us get started.&lt;br /&gt;
&lt;br /&gt;
Let us see how to get a framed box with colours.&lt;br /&gt;
|- &lt;br /&gt;
|| Uncomment the line 27&lt;br /&gt;
&lt;br /&gt;
Run the code&lt;br /&gt;
&lt;br /&gt;
show the output&lt;br /&gt;
|| Uncomment line 27.&lt;br /&gt;
&lt;br /&gt;
Run the code.&lt;br /&gt;
&lt;br /&gt;
Output shows a boxed text in yellow and some random text in it.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Highlight: '''&lt;br /&gt;
&lt;br /&gt;
'''line 27'''&lt;br /&gt;
|| The command '''\colorbox '''takes 2 arguments.&lt;br /&gt;
&lt;br /&gt;
The first one is the colour of the box.&lt;br /&gt;
&lt;br /&gt;
And the second one is the text that is inside the box.&lt;br /&gt;
|- &lt;br /&gt;
|| Uncomment the line 31&lt;br /&gt;
&lt;br /&gt;
Run the code&lt;br /&gt;
&lt;br /&gt;
show the output&lt;br /&gt;
|| Uncomment line 31.&lt;br /&gt;
&lt;br /&gt;
Run the code.&lt;br /&gt;
&lt;br /&gt;
Output shows some text enclosed in a box.&lt;br /&gt;
&lt;br /&gt;
The color of the frame is red and&lt;br /&gt;
&lt;br /&gt;
box filled with green colour.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Highlight:'''&lt;br /&gt;
&lt;br /&gt;
'''line 31'''&lt;br /&gt;
|| This command creates a framed box.&lt;br /&gt;
&lt;br /&gt;
The command '''\fcolorbox '''takes 3 arguments.&lt;br /&gt;
&lt;br /&gt;
First one is the frame colour.&lt;br /&gt;
&lt;br /&gt;
Second one is the colour to be filled in the box.&lt;br /&gt;
&lt;br /&gt;
Third is the actual text that goes inside the framed box.&lt;br /&gt;
|- &lt;br /&gt;
|| Uncomment the line 33&lt;br /&gt;
&lt;br /&gt;
Run the code&lt;br /&gt;
&lt;br /&gt;
show the output&lt;br /&gt;
|| Uncomment line 33.&lt;br /&gt;
&lt;br /&gt;
Run the code&lt;br /&gt;
&lt;br /&gt;
Output shows another framed box with a black frame filled with lime colour.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let us now see how to define new colours.&lt;br /&gt;
|- &lt;br /&gt;
|| Uncomment the line 35&lt;br /&gt;
&lt;br /&gt;
'''Highlight:'''&lt;br /&gt;
&lt;br /&gt;
'''line 35'''&lt;br /&gt;
&lt;br /&gt;
Point to the defined colour.&lt;br /&gt;
&lt;br /&gt;
Show the options shown as reference, &lt;br /&gt;
|| Uncomment line 35.&lt;br /&gt;
&lt;br /&gt;
The command '''\definecolor''' defines a new colour. &lt;br /&gt;
&lt;br /&gt;
It takes 3 arguments.&lt;br /&gt;
&lt;br /&gt;
1. name of the new colour to be defined&lt;br /&gt;
&lt;br /&gt;
2. model – '''rgb, cmyk''' etc.&lt;br /&gt;
&lt;br /&gt;
3. colour definition – Each number shows how much red, green, and blue are mixed to get a new color.&lt;br /&gt;
&lt;br /&gt;
Here we have defined a colour called '''myOrange''' in rgb model .&lt;br /&gt;
&lt;br /&gt;
Complete options are given at the end of the '''TeX''' file for reference.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let us apply the newly defined '''myOrange '''colour to the text.&lt;br /&gt;
|- &lt;br /&gt;
|| Uncomment the line 37&lt;br /&gt;
&lt;br /&gt;
Run the code and show the output&lt;br /&gt;
|| Uncomment line 37&lt;br /&gt;
&lt;br /&gt;
Run the code&lt;br /&gt;
&lt;br /&gt;
Output shows the text in '''myOrange''' colour from the section heading onwards.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| Let’s see how to colour the rows in the table.&lt;br /&gt;
|- &lt;br /&gt;
|| Comment line 4&lt;br /&gt;
&lt;br /&gt;
Uncomment the line 41, 5&lt;br /&gt;
&lt;br /&gt;
Run the code and show the output&lt;br /&gt;
|| Comment line 4.&lt;br /&gt;
&lt;br /&gt;
Uncomment lines 5 and 41.&lt;br /&gt;
&lt;br /&gt;
Run the code.&lt;br /&gt;
&lt;br /&gt;
The output shows the table rows in yellow and lime colour.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Highlight:'''&lt;br /&gt;
&lt;br /&gt;
'''lines 41, 5'''&lt;br /&gt;
|| The command '''\rowcolors''' painted the rows in the table.&lt;br /&gt;
&lt;br /&gt;
We also need to load the package''' xcolor''' with''' [table]''' option to use this command.&lt;br /&gt;
&lt;br /&gt;
The '''\rowcolors''' command takes 3 arguments:&lt;br /&gt;
&lt;br /&gt;
1. The row number from which coloring should begin&lt;br /&gt;
&lt;br /&gt;
2. color for odd-numbered rows&lt;br /&gt;
&lt;br /&gt;
3. color for even-numbered rows&lt;br /&gt;
&lt;br /&gt;
Here, it starts colouring from row 1.&lt;br /&gt;
&lt;br /&gt;
Odd rows are colored in yellow and even rows in lime colour.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the table.&lt;br /&gt;
|| Let us see how changing the starting row number affects the coloring.&lt;br /&gt;
|- &lt;br /&gt;
|| Comment the line 41&lt;br /&gt;
&lt;br /&gt;
Uncomment the line 43&lt;br /&gt;
&lt;br /&gt;
Run the code and show the output&lt;br /&gt;
|| Comment line 41&lt;br /&gt;
&lt;br /&gt;
Uncomment line 43.&lt;br /&gt;
&lt;br /&gt;
Run the code.&lt;br /&gt;
&lt;br /&gt;
Output shows colouring of the rows starting from the second row.&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight line 43&lt;br /&gt;
|| Here the''' \rowcolors '''command is defined with argument 2.&lt;br /&gt;
&lt;br /&gt;
This means the coloring starts from row two.&lt;br /&gt;
&lt;br /&gt;
The first row is not coloured.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 6'''&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have learnt:&lt;br /&gt;
* Creating boxes with colours and borders&lt;br /&gt;
* Defining custom colors using RGB, CMYK, HTML, and other models&lt;br /&gt;
* Applying colours to table rows&lt;br /&gt;
|| With this we come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
Let us summarise.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 7'''&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
&lt;br /&gt;
Define a new colour maroon using the '''RGB''' model mixing as (0.9, 0, 0).&lt;br /&gt;
&lt;br /&gt;
Use it as text colour of the document&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 8'''&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|| Thank you for joining&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ketkinaina</name></author>	</entry>

	</feed>