Shopy 101
← Renkler Sign in to download

Yazılara renk ekleme xcolor paketi tarafından desteklenmektedir (color paketi ile değiştirir). Bu paketi kullanarak, yazıtipi rengini, yazı arkaplanı rengini, ya da sayfa arkaplanı rengini ayarlayabilirsiniz. Öntanımlı renklerden seçmek ya da kendi renklerini RGB, Hex, ya da CMYK ile tanımlamak da ayrıca mümkün. Matematiksel formüller ayrıca renklendirilebilir.

xcolor paketini eklemek

To make use of these features, the Şablon:LaTeX/Package package must be imported. Şablon:LaTeX/Package starts from the basic facilities of the Şablon:LaTeX/Package package and extends it. Şablon:LaTeX/Usage The package allows you to use the names of 19 base colors (black, white, blue, green, yellow, red etc.); these names are always available. Besides, the package has some options to get more predefined colors, which should be added globally. Şablon:LaTeX/Parameter allows you to access more than 60 colors, and Şablon:LaTeX/Parameter allows access to about 150 colors. If you need more color names, then you may also want to look at the Şablon:LaTeX/Parameter option that offers more than 300 colors.

The Şablon:LaTeX/Parameter option allows colors to be added to tables.

Renkli yazıyı eklemek

The simplest way to type colored text is by: Şablon:LaTeX/Usage where Şablon:LaTeX/Parameter is a color that was defined before by "}},"i":0}}]}' id="mwGQ">\definecolor.

Another possible way by

Şablon:LaTeX/Usage that will switch the standard text color to the color you want. It will work until the end of the current TeX group. For example: \\emph{some black text, {\\color{red}followed by a red fragment}}, going black again.</nowiki>"},"render":{"wt":"[[image:LaTeX colour demo 1.png|380pik]]"}},"i":0}}]}' data-mw-i18n='{"title":{"lang":"x-page","key":"red-link-title","params":["Şablon:LaTeX/Example"]}}' id="mwHw">Şablon:LaTeX/Example

The difference between "}},"i":0}}]}' id="mwIQ">\textcolor and "}},"i":0}}]}' id="mwJA">\color is the same as that between "}},"i":0}}]}' id="mwJw">\texttt and "}},"i":0}}]}' id="mwKg">\ttfamily, you can use the one you prefer. The "}},"i":0}}]}' id="mwLQ">\color environment allows the text to run over multiple lines and other text environments whereas the text in "}},"i":0}}]}' id="mwMA">\textcolor must all be one paragraph and not contain other environments.

You can change the background color of the whole page by: Şablon:LaTeX/Usage

Yazılara renkli arkaplanlar ayarlamak

\colorbox{declared-color}{text}

Eğer arkaplan rengi ve yazı rengi değiştiyse:

\colorbox{declared-color1}{\color{declared-color2}text}

Ayrıca \fcolorbox adındaki komut da çerçeveli arkaplan renkleri yapabilir:

\fcolorbox{declared-color-frame}{declared-color-background}{text}

Predefined colors

The predefined color names are

black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, magenta, olive, orange, pink, purple, red, teal, violet, white, yellow.

There may be other pre-defined colors on your system, but these should be available on all systems.

If you would like a color not pre-defined, you can use one of the 68 dvips colors, or define your own. These options are discussed in the following sections

The 68 standard colors known to dvips

Invoke the package with the usenames and dvipsnames option. If you are using Şablon:LaTeX/Package or Şablon:LaTeX/Package package you must declare the xcolor package before that, otherwise it will not work.

Şablon:LaTeX/Usage

This above syntax may result in an error if you are using beamer with Şablon:LaTeX/Package. To go around it, include usenames and dvipsnames options when defining the document class.

Şablon:LaTeX/Usage Be wary that the below color names are case-sensitive. For example, "}},"i":0}}]}' id="mwXg">\color{olivegreen} raises an "undefined color" error, but "}},"i":0}}]}' id="mwYw">\color{OliveGreen} works fine. Table can be sorted by color name, by hue, by saturation, or by lightness.

Name Color Hex Hue Saturation Lightness
Apricot FBB98227.3239.2190.5
Aquamarine 00B5BE182.8255.095.0
Bittersweet C04F1719.9200.4107.5
Black 221E1F0.315.932.0
Blue 2D2F92238.2134.895.5
BlueGreen 00B3B8181.6255.092.0
BlueViolet 473992249.4111.8101.5
BrickRed B6321C8.6187.0105.0
Brown 79250018.3255.060.5
BurntOrange F7921D32.2237.6138.0
CadetBlue 74729A243.042.1134.0
CarnationPink F282B4333.2207.0186.0
Cerulean 00A2E3197.2255.0113.5
CornflowerBlue 41B0E4199.1191.5146.5
Cyan 00AEEF196.3255.0119.5
Dandelion FDBC4239.1249.7159.5
DarkOrchid A4538A319.383.6123.5
Emerald 00A99D175.7255.084.5
ForestGreen 009B55152.9255.077.5
Fuchsia 8C368C300.0113.097.0
Goldenrod FFDF4249.8255.0160.5
Gray 9496980.24.9150.0
Green 00A64F148.6255.083.0
GreenYellow DFE67463.7177.3173.0
JungleGreen 00A99A174.7255.084.5
Lavender F49EC4333.5203.1201.0
LimeGreen 8DC73E85.4140.3130.5
Magenta EC008C324.4255.0118.0
Mahogany A9341F9.1176.0100.0
Maroon AF3235358.6141.7112.5
Melon F89E7B16.8229.3185.5
MidnightBlue 006795198.5255.074.5
Mulberry A93C93312.1121.4114.5
NavyBlue 006EB8204.1255.092.0
OliveGreen 3C8031111.6113.888.5
Orange F5813723.4230.7150.0
OrangeRed ED135A340.5218.9128.0
Orchid AF72B0299.071.9145.0
Peach F7965A22.9231.4168.5
Periwinkle 7977B8241.880.1151.5
PineGreen 008B72169.2255.069.5
Plum 92268F301.7149.792.0
ProcessBlue 00B0F0196.0255.0120
Purple 99479B298.694.8113.0
RawSienna 97400624.0235.578.5
Red ED1B23357.7217.7132.0
RedOrange F2603513.7224.2147.5
RedViolet A1246B325.9161.898.5
Rhodamine EF559F331.2211.1162.0
RoyalBlue 0071BC203.9255.094.0
RoyalPurple 613F99262.7106.3108.0
RubineRed ED017D328.5252.9119.0
Salmon F692895.0218.9191.5
SeaGreen 3FBC9D165.1127.0125.5
Sepia 67180014.0255.051.5
SkyBlue 46C5DD189.5175.8145.5
SpringGreen C6DC6771.3159.5161.5
Tan DA9D7623.4146.6168.0
TealBlue 00AEB3181.7255.089.5
Thistle D883B7323.3133.0173.5
Turquoise 00B4CE187.6255.0103.0
Violet 58429B254.8102.7110.5
VioletRed EF58A0331.4210.4163.5
White FFFFFF0.10.0255.0
WildStrawberry EE2967341.1217.5139.5
Yellow FFF20056.9255.0127.5
YellowGreen 98CC7093.9120.9158.0
YellowOrange FAA21A36.4244.1138.0

Defining new colors

If the predefined colors are not adequate, you may wish to define your own.

Place

Define the colors in the preamble of your document. (Reason: do so in the preamble, so that you can already refer to them in the preamble, which is useful, for instance, in an argument of another package that supports colors as arguments, such as the listings package.)

Method

You need to include the Şablon:LaTeX/Package package in your preamble to define new colors. In the abstract, the colors are defined following this scheme:

Şablon:LaTeX/Usage

where:

  • name is the name of the color; you can call it as you like
  • model is the way you describe the color, and is one of gray, rgb, RGB, HTML, and cmyk.
  • color-spec is the description of the color

Color Models

Among the models you can use to describe the color are the following (several more are described in the xcolor manual):

Color Models
Model Description Color Specification Example
grayShades of gray
(0-1)
Just one number between 0 (black) and 1 (white), so 0.95 will be very light gray, 0.30 will be dark gray.\definecolor{light-gray}{gray}{0.95}
rgbRed, Green, Blue
(0-1)
Three numbers given in the form red,green,blue; the quantity of each color is represented with a number between 0 and 1.\definecolor{orange}{rgb}{1,0.5,0}
RGBRed, Green, Blue
(0-255)
Three numbers given in the form red,green,blue; the quantity of each color is represented with a number between 0 and 255.\definecolor{orange}{RGB}{255,127,0}
HTMLRed, Green, Blue
(00-FF)
Six hexadecimal numbers given in the form RRGGBB; similar to what is used in HTML.\definecolor{orange}{HTML}{FF7F00}
cmykCyan, Magenta, Yellow, Black
(0-1)
Four numbers given in the form cyan,magenta,yellow,black; the quantity of each color is represented with a number between 0 and 1.\definecolor{orange}{cmyk}{0,0.5,1,0}

Examples

To define a new color, follow the following example, which defines orange for you, by setting the red to the maximum, the green to one half (0.5), and the blue to the minimum:

Şablon:LaTeX/Usage

The following code should give a similar results to the last code chunk.

Şablon:LaTeX/Usage

If you loaded the Şablon:LaTeX/Package package, you can define colors upon previously defined ones.

The first specifies 20 percent blue and 80 percent white; the second is a mixture of 20 percent blue and 80 percent black; and the last one is a mixture of (20*0.3) percent blue, ((100-20)*0.3) percent black and (100-30) percent green.

Şablon:LaTeX/Usage

Şablon:LaTeX/Package also features a handy command to define colors from color mixes:

Şablon:LaTeX/Usage

Using color specifications directly

Normally one would predeclare all the colors as above, but sometimes it is convenient to directly use a color without naming it first. To achieve this, "}},"i":0}}]}' id="mwAzk">\color and "}},"i":0}}]}' id="mwAzw">\textcolor have an alternative syntax specifying the model in square brackets, and the color specification in curly braces. For example:

Şablon:LaTeX/Usage

Creating / Capturing colors

You may want to use colors that appear on another document, web pages, pictures, etc. Alternatively, you may want to play around with rgb values to create your own custom colors.

Image processing suites like the free GIMP suite for Linux/Windows/Mac offer color picker facilities to capture any color on your screen or synthesize colors directly from their respective rgb / hsv / hexadecimal values.

Smaller, free utilities also exist:

Spot colors

Spot colors are customary in printing. They usually refer to pre-mixed inks based on a swatchbook (like Pantone, TruMatch or Toyo). The package Şablon:LaTeX/Package extends xcolor to provide real spot colors (CMYK and CIELAB). They are defined with, say:

Şablon:LaTeX/Usage

Kaynakça

Previous: HiperBağlantılar İçerik İleri: Paketler