HTML Color Codes and Converting RGB to Hexadecimal HTML颜色守则和转换为十六进制的RGB

Advertisements广告

When I当我 redesigned重新设计 my blog, I wanted my我的博客,我想我的 Adsense的Adsense unit to merge properly with the background of the theme.单位合并妥善的背景主题。 My earlier theme had white background, so it was never a problem to integrate the ads.我刚才的主题了白色的背景,所以这是从来没有的问题,将广告。 The sidebar of my new theme has a unique color and I wanted the background of my Adsense unit to have the same color.该栏我的新主题,具有独特的颜色和我想的背景下,我国AdSense单元具有相同的颜色。 Adsense setup has only a small collection of colors (although we can manually enter the colors). AdSense设置了只有一小收集的颜色(尽管我们可以手动输入的颜色) 。 I didn’t have Photoshop or a GIMP installed in my system (office computer from where I blog).我没有Photoshop或1页安装在我的系统(办公电脑从我的博客) 。 Now the question is how to get the correct color code when you don’t have any picture editors?现在的问题是如何获得正确的颜色代码时,你没有任何图片编辑?

This is pretty simple!这是很简单! I took screen shot of my blog and pasted in paint.我把画面我的博客并粘贴涂料。 Using the color picker, I selected the color of my sidebar.用颜色挑选器,我选择的颜色我的侧栏。 Now paint displays color in RGB format and I wanted it in hexadecimal format.现在,涂料颜色显示RGB格式,我想它在十六进位格式。 My color was RGB (216, 217, 198).我的颜色的RGB ( 216 , 217 , 198 ) 。 HTML colors codes are made up of 3 sets of hex numbers, one for Red, one for Green, and one for Blue and to get the color code in hexadecimal format is very simple.颜色的HTML代码是由3套十六进制数字,一个红色,一个绿色,一个蓝色,并获得颜色代码在十六进位格式非常简单。

Here the calculator that comes with Windows is handy, to convert between Decimal and Hex values.这里的计算器来与Windows方便,转换之间的十进制和十六进制值。 Open the calculator and select View and then Scientific.打开计算器,选择查看,然后科学。 Once you do this, you’ll see more buttons and controls on the calculator.一旦你做到这一点,你会看到更多的按钮和控制计算器。 Click “Dec” and the key in a number (the number that is specific to red).点击“ 12月” ,关键在一个号码(该号码,具体为红色) 。 Now click “Hex” and it’ll convert the number to hex.现在,点击“六角” ,它会转换为十六进制数。 To convert from Hex to Dec, click on “Hex”, key in the number, and then click “Dec”.要转换从六角至12月,点击“六角” ,关键在数量,然后点击“ 12月” 。 Sometimes you’ll get a color specification in Decimal, for example (128, 30, 80) and you can use this method to convert it to hex (80, 1E, 50) which would look like this for your HTML color #801E50.有时候,你会得到一种颜色规格的十进制,如( 128 , 30 , 80 ) ,您可以使用此方法将它转化成十六进位( 80 , 1E , 50 )这看起来您的HTML颜色# 801E50 。 ( Imp: Don’t key in all the three numbers and convert to hexadecimal, this would give a different combination) The decimal part for a color varies from 0-255 and we can have different combinations by varying this RGB combination.进出口:不要在所有关键的三个电话号码,并转换为十六进制,这将给不同的组合)的小数部分的颜色不同, 0-255 ,我们可以有不同的组合不同这三原色的组合。

Here are some of the common colors and their decimal and hexadecimal codes.以下是一些常见的颜色和它们的十进制和十六进制代码。

000000 is black (0’s for all three colors) 000000是黑色( 0的所有三种颜色)
FFFFFF is white (255’s for all three colors) FFFFFF是白色的( 255的所有三种颜色)
FF0000 is all RED (255 for Red, 0 green, 0 blue) FF0000是红色( 255的Red , 0绿色,蓝色0 )
00FF00 is all GREEN (0 Red, 255 green, 0 blue) 00FF00是所有绿色( 0红, 255绿,蓝0 )
0000FF is all Blue (0 red, 0 green, 255 blue) 0000FF是蓝( 0红色, 0绿色,蓝色255 )
FFFF00 is Yellow (255 red, 255 green, and 0 blue) FFFF00是黄河( 255红, 255绿,蓝0 )
808080 is a gray (128 red, 128 green, and 125 blue)八十零万八千○八十○是灰色的( 128红, 128绿, 125蓝)

Next time when you face this issue, try our this method.下一次当你面对这一问题,我们尝试这种方法。 There is a small software (62 kb),有一个小软件( 62 kB的) , Pixie小精灵 , which will tell you the Hex, RGB, HTML, CMYK and HSV values of any color. ,这将告诉你,六角,三原色, HTML格式, CMYK和HSV价值的任何颜色。

Technorati tags: Technorati的标签: , ,

Share this Post分享这个邮报

StumbleUpon公司- 4848.pngDigg的- 4848.pngTechnorati的- 4848.png供稿- 4848.png美味- 4848.png

Comments评论

  • Rishi Rishi said: 说:

    Hey thanks!嘿谢谢! I was searching a reference for this from a long time.我是搜索范围从很长一段时间。 : )

  • Silki Silki said: 说:

    Hi Nirmal,您好Nirmal ,
    I think there is a very simple tool called “Color Cop” available exactly for the same purpose.我认为是一个非常简单的工具,所谓的“彩色警探”完全可以为同样的目的。 You can download it at您可以下载它 http://www.colorcop.net . It will not take more than 5 seconds (yes 5 seconds) to determine the hex colour code of any pixel on your screen.它不会超过5秒(是5秒) ,以确定十六进制颜色代码的任何像素在屏幕上。 The use is extremely easy.使用非常简单。
    I am a total new entrant to the blogosphere and had just shot off my blog webtools-desinet1.blogspot.com.我总新加入者的博客和刚刚枪杀了我的博客webtools - desinet1.blogspot.com 。 I have not even finished its template part.我还没有完成其模板的一部分。
    I would love to hear from you.我希望听到您的意见。

  • nirmaltv nirmaltv said: 说:

    @Rishi, @ Rishi ,
    Thanks for your feedback, hope it was useful for you.感谢您的意见,希望它是有用的你。

    @Silki, @ Silki ,
    Thanks for letting me know about the software.感谢让我知道该软件。 I have also mentioned about another software Pixie, which can convert to all formats.我还提到了另一个软件小精灵,它可以转化为各种格式。


Add a comment添加评论

Translate Page网页翻译

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanПереведите к русскому/RussianΜεταφράστε στα ελληνικά/GreekVertaal aan het Nederlands/Dutchترجمة الى العربية/Arabic中文翻译/Chinese Traditional
中文翻译/Chinese Simplified한국어에게 번역하십시오/Korean日本語に翻訳しなさい /JapaneseTraduza ao Português/PortugueseTraduca ad Italiano/ItalianTraduisez au Français/FrenchTraduzca al Español/Spanish
Nirmal is a Software Engineer and Technology Blogger. Nirmal是一个软件工程师和技术的Blogger 。 He is a Microsoft Most Valuable Professional in Windows Desktop Experience.他是微软最有价值专家在Windows桌面体验。
mvp印度技术博客