2014년 6월 23일 월요일

Class CaseInsensitiveMap

요건 말 그대로 대,소문자에 둔감한- insensitive - 맵 형식임.

위치 : org.apache.commons.collections.map.CaseInsensitiveMap
설명 : 
1. 모든 키는 소문자로 변환한다 - newKey.toString().toLower();
2. null 도 사용 가능

사용 예 : 

Map map = new CaseInsensitiveMap();
map.put("One","111");
map.put("Two","222");
map.put(null,"333");
map.put("one","444");

이렇게 하면 One 와 one 가 소문자로 변환되어 one 로 통일됨
리턴 키는 {"one","two",null}
리턴 값은 {"444","222","333"}

이제 키값의 대 소문자 구분없이 그냥
map.get("one"); 이렇게 하면 됨 !!

2014년 6월 20일 금요일

[error] 자바 스크립트와 자바 통신에서 한글이 깨질 경우

<자바 스크립트>
넘기는 값 : encodeURIComponent(넣을 값)

<자바>
받는 값 : URLDecoder.decode(request.getString("받는 값"), "UTF-8")

예시)
javascript--

jQuery.ajax({
type : 'POST',
dataType: 'json',
url : url,
async : false,
data         : name: encodeURIComponent('테스트'),
success : function(data){
ajaxResult = data.resultFlag;
},
error : function(xhr, ajaxOptions, thrownError){
alert('status: '+xhr.status+'\n error: '+thrownError);
}
});

JAVA--

String name = URLDecoder.decode(request.getString("name"), "UTF-8");

2014년 6월 11일 수요일

[javascript] String prototype

/*--------------------------------------------------------------------------------
 *  String prototype
 *--------------------------------------------------------------------------------*/
//-----------------------------------------------------------------------------
// 문자의 좌, 우 공백 제거
// @return : String
//-----------------------------------------------------------------------------
String.prototype.trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "");
}
//-----------------------------------------------------------------------------
// 문자의 좌 공백 제거
// @return : String
//-----------------------------------------------------------------------------
String.prototype.ltrim = function() {
    return this.replace(/(^\s*)/, "");
}
//-----------------------------------------------------------------------------
// 문자의 우 공백 제거
// @return : String
//-----------------------------------------------------------------------------
String.prototype.rtrim = function() {
    return this.replace(/(\s*$)/, "");
}
//-----------------------------------------------------------------------------
// 문자열의 byte 길이 반환
// @return : int
//-----------------------------------------------------------------------------
String.prototype.byte = function() {
    var cnt = 0;
    for (var i = 0; i < this.length; i++) {
        if (this.charCodeAt(i) > 127)
            cnt += 2;
        else
            cnt++;
    }
    return cnt;
}
//-----------------------------------------------------------------------------
// 정수형으로 변환
// @return : String
//-----------------------------------------------------------------------------
String.prototype.int = function() {
    if(!isNaN(this)) {
        return parseInt(this);
    }
    else {
        return null;
    }
}
//-----------------------------------------------------------------------------
// 숫자만 가져 오기
// @return : String
//-----------------------------------------------------------------------------
String.prototype.num = function() {
    return (this.trim().replace(/[^0-9]/g, ""));
}
//-----------------------------------------------------------------------------
// 숫자에 3자리마다 , 를 찍어서 반환
// @return : String
//-----------------------------------------------------------------------------
String.prototype.money = function() {
    var num = this.trim();
    while((/(-?[0-9]+)([0-9]{3})/).test(num)) {
        num = num.replace((/(-?[0-9]+)([0-9]{3})/), "$1,$2");
    }
    return num;
}
//-----------------------------------------------------------------------------
// 숫자의 자리수(cnt)에 맞도록 반환
// @return : String
//-----------------------------------------------------------------------------
String.prototype.digits = function(cnt) {
    var digit = "";
    if (this.length < cnt) {
        for(var i = 0; i < cnt - this.length; i++) {
            digit += "0";
        }
    }
    return digit + this;
}
//-----------------------------------------------------------------------------
// " -> &#34; ' -> &#39;로 바꾸어서 반환
// @return : String
//-----------------------------------------------------------------------------
String.prototype.quota = function() {
    return this.replace(/"/g, "&#34;").replace(/'/g, "&#39;");
}
//-----------------------------------------------------------------------------
// 파일 확장자만 가져오기
// @return : String
//-----------------------------------------------------------------------------
String.prototype.ext = function() {
    return (this.indexOf(".") < 0) ? "" : this.substring(this.lastIndexOf(".") + 1, this.length);
}
//-----------------------------------------------------------------------------
// URL에서 파라메터 제거한 순수한 url 얻기
// @return : String
//-----------------------------------------------------------------------------
String.prototype.uri = function() {
    var arr = this.split("?");
    arr = arr[0].split("#");
    return arr[0];
}

-------------------------------------------------------------------------------*\
각종 체크 함수들
-------------------------------------------------------------------------------*/
//-----------------------------------------------------------------------------
// 정규식에 쓰이는 특수문자를 찾아서 이스케이프 한다.
// @return : String
//-----------------------------------------------------------------------------
String.prototype.meta = function() {
    var str = this;
    var result = ""
    for(var i = 0; i < str.length; i++) {
        if((/([\$\(\)\*\+\.\[\]\?\\\^\{\}\|]{1})/).test(str.charAt(i))) {
            result += str.charAt(i).replace((/([\$\(\)\*\+\.\[\]\?\\\^\{\}\|]{1})/), "\\$1");
        }
        else {
            result += str.charAt(i);
        }
    }
    return result;
}
//-----------------------------------------------------------------------------
// 정규식에 쓰이는 특수문자를 찾아서 이스케이프 한다.
// @return : String
//-----------------------------------------------------------------------------
String.prototype.remove = function(pattern) {
    return (pattern == null) ? this : eval("this.replace(/[" + pattern.meta() + "]/g, \"\")");
}
//-----------------------------------------------------------------------------
// 최소 최대 길이인지 검증
// str.isLength(min [,max])
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isLength = function() {
    var min = arguments[0];
    var max = arguments[1] ? arguments[1] : null;
    var success = true;
    if(this.length < min) {
        success = false;
    }
    if(max && this.length > max) {
        success = false;
    }
    return success;
}
//-----------------------------------------------------------------------------
// 최소 최대 바이트인지 검증
// str.isByteLength(min [,max])
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isByteLength = function() {
    var min = arguments[0];
    var max = arguments[1] ? arguments[1] : null;
    var success = true;
    if(this.byte() < min) {
        success = false;
    }
    if(max && this.byte() > max) {
        success = false;
    }
    return success;
}
//-----------------------------------------------------------------------------
// 공백이나 널인지 확인
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isBlank = function() {
    var str = this.trim();
    for(var i = 0; i < str.length; i++) {
        if ((str.charAt(i) != "\t") && (str.charAt(i) != "\n") && (str.charAt(i)!="\r")) {
            return false;
        }
    }
    return true;
}
//-----------------------------------------------------------------------------
// 숫자로 구성되어 있는지 학인
// arguments[0] : 허용할 문자셋
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isNum = function() {
    return (/^[0-9]+$/).test(this.remove(arguments[0])) ? true : false;
}
//-----------------------------------------------------------------------------
// 영어만 허용 - arguments[0] : 추가 허용할 문자들
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isEng = function() {
    return (/^[a-zA-Z]+$/).test(this.remove(arguments[0])) ? true : false;
}
//-----------------------------------------------------------------------------
// 숫자와 영어만 허용 - arguments[0] : 추가 허용할 문자들
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isEngNum = function() {
    return (/^[0-9a-zA-Z]+$/).test(this.remove(arguments[0])) ? true : false;
}
//-----------------------------------------------------------------------------
// 숫자와 영어만 허용 - arguments[0] : 추가 허용할 문자들
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isNumEng = function() {
    return this.isEngNum(arguments[0]);
}
//-----------------------------------------------------------------------------
// 아이디 체크 영어와 숫자만 체크 첫글자는 영어로 시작 - arguments[0] : 추가 허용할 문자들
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isUserid = function() {
    return (/^[a-zA-z]{1}[0-9a-zA-Z]+$/).test(this.remove(arguments[0])) ? true : false;
}
//-----------------------------------------------------------------------------
// 한글 체크 - arguments[0] : 추가 허용할 문자들
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isKor = function() {
    return (/^[가-힣]+$/).test(this.remove(arguments[0])) ? true : false;
}
//-----------------------------------------------------------------------------
// 주민번호 체크 - arguments[0] : 주민번호 구분자
// XXXXXX-XXXXXXX
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isJumin = function() {
    var arg = arguments[0] ? arguments[0] : "";
    var jumin = eval("this.match(/[0-9]{2}[01]{1}[0-9]{1}[0123]{1}[0-9]{1}" + arg + "[1234]{1}[0-9]{6}$/)");
    if(jumin == null) {
        return false;
    }
    else {
        jumin = jumin.toString().num().toString();
    }
    // 생년월일 체크
    var birthYY = (parseInt(jumin.charAt(6)) == (1 ||2)) ? "19" : "20";
    birthYY += jumin.substr(0, 2);
    var birthMM = jumin.substr(2, 2) - 1;
    var birthDD = jumin.substr(4, 2);
    var birthDay = new Date(birthYY, birthMM, birthDD);
    if(birthDay.getYear() % 100 != jumin.substr(0,2) || birthDay.getMonth() != birthMM || birthDay.getDate() != birthDD) {
        return false;
    }
    var sum = 0;
    var num = [2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5]
    var last = parseInt(jumin.charAt(12));
    for(var i = 0; i < 12; i++) {
        sum += parseInt(jumin.charAt(i)) * num[i];
    }
    return ((11 - sum % 11) % 10 == last) ? true : false;
}
//-----------------------------------------------------------------------------
// 외국인 등록번호 체크 - arguments[0] : 등록번호 구분자
// XXXXXX-XXXXXXX
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isForeign = function() {
    var arg = arguments[0] ? arguments[0] : "";
    var jumin = eval("this.match(/[0-9]{2}[01]{1}[0-9]{1}[0123]{1}[0-9]{1}" + arg + "[5678]{1}[0-9]{1}[02468]{1}[0-9]{2}[6789]{1}[0-9]{1}$/)");
    if(jumin == null) {
        return false;
    }
    else {
        jumin = jumin.toString().num().toString();
    }
    // 생년월일 체크
    var birthYY = (parseInt(jumin.charAt(6)) == (5 || 6)) ? "19" : "20";
    birthYY += jumin.substr(0, 2);
    var birthMM = jumin.substr(2, 2) - 1;
    var birthDD = jumin.substr(4, 2);
    var birthDay = new Date(birthYY, birthMM, birthDD);
    if(birthDay.getYear() % 100 != jumin.substr(0,2) || birthDay.getMonth() != birthMM || birthDay.getDate() != birthDD) {
        return false;
    }
    if((parseInt(jumin.charAt(7)) * 10 + parseInt(jumin.charAt(8))) % 2 != 0) {
        return false;
    }
    var sum = 0;
    var num = [2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5]
    var last = parseInt(jumin.charAt(12));
    for(var i = 0; i < 12; i++) {
        sum += parseInt(jumin.charAt(i)) * num[i];
    }
    return (((11 - sum % 11) % 10) + 2 == last) ? true : false;
}
//-----------------------------------------------------------------------------
// 사업자번호 체크 - arguments[0] : 등록번호 구분자
// XX-XXX-XXXXX
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isBiznum = function() {
    var arg = arguments[0] ? arguments[0] : "";
    var biznum = eval("this.match(/[0-9]{3}" + arg + "[0-9]{2}" + arg + "[0-9]{5}$/)");
    if(biznum == null) {
        return false;
    }
    else {
        biznum = biznum.toString().num().toString();
    }
    var sum = parseInt(biznum.charAt(0));
    var num = [0, 3, 7, 1, 3, 7, 1, 3];
    for(var i = 1; i < 8; i++) sum += (parseInt(biznum.charAt(i)) * num[i]) % 10;
    sum += Math.floor(parseInt(parseInt(biznum.charAt(8))) * 5 / 10);
    sum += (parseInt(biznum.charAt(8)) * 5) % 10 + parseInt(biznum.charAt(9));
    return (sum % 10 == 0) ? true : false;
}
//-----------------------------------------------------------------------------
// 법인 등록번호 체크 - arguments[0] : 등록번호 구분자
// XXXXXX-XXXXXXX
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isCorpnum = function() {
    var arg = arguments[0] ? arguments[0] : "";
    var corpnum = eval("this.match(/[0-9]{6}" + arg + "[0-9]{7}$/)");
    if(corpnum == null) {
        return false;
    }
    else {
        corpnum = corpnum.toString().num().toString();
    }
    var sum = 0;
    var num = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]
    var last = parseInt(corpnum.charAt(12));
    for(var i = 0; i < 12; i++) {
        sum += parseInt(corpnum.charAt(i)) * num[i];
    }
    return ((10 - sum % 10) % 10 == last) ? true : false;
}
//-----------------------------------------------------------------------------
// 이메일의 유효성을 체크
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isEmail = function() {
    return (/\w+([-+.]\w+)*@\w+([-.]\w+)*\.[a-zA-Z]{2,4}$/).test(this.trim());
}
//-----------------------------------------------------------------------------
// 전화번호 체크 - arguments[0] : 전화번호 구분자
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isPhone = function() {
    var arg = arguments[0] ? arguments[0] : "";
    return eval("(/(02|0[3-9]{1}[0-9]{1})" + arg + "[1-9]{1}[0-9]{2,3}" + arg + "[0-9]{4}$/).test(this)");
}
//-----------------------------------------------------------------------------
// 핸드폰번호 체크 - arguments[0] : 핸드폰 구분자
// @return : boolean
//-----------------------------------------------------------------------------
String.prototype.isMobile = function() {
    var arg = arguments[0] ? arguments[0] : "";
    return eval("(/01[016789]" + arg + "[1-9]{1}[0-9]{2,3}" + arg + "[0-9]{4}$/).test(this)");
}

2014년 5월 7일 수요일

Context attributes in Tomcat

속성 설명
backgroundProcessorDelay 이 값은 컨텍스트와 그 자식 컨테이너에서 background process method가 invoke되는 delay 시간을 나타낸다.
이 값을 양수로 설정하면 어떤 쓰레드가 분기되어 일정 시간 후에 이 쓰레드가 해당 host와 자식 컨테이너에서 background process method를 실행시킵니다
만약 설정하지 않으면 디폴트값인 -1을 가지며 음수의 값은 부모 host의 background processing 정책을 사용한다는 것입니다.
참고로 컨텍스트는 세션을 종료하거나 클래스 리로딩을 위한 모니터링등을 위해 background processing을 사용합니다.
className 사용할 Java 구현체 클래스의 이름. 이 클래스는 반드시 org.apache.catalina.Context 인터페이스를 구현해야 합니다. 지정하지 않으면 표준값 (아래에 정의됩니다)이 사용됩니다
cookies true(디폴트)로 지정하면 클라이언트가 쿠키를 지원하는 경우 세션확인의 통신수단(session identifier communication)으로 쿠키를 사용합니다. false로 지정하면 세션확인의 통신수단으로 쿠키 사용을 하지 않고, 어플리케이션에 의한 URL 다시쓰기(URL rewriting)에만 의존한다는 의미입니다.
crossContext true로 지정하면 이 어플리케이션에서 ServletContext.getContext() 호출을 통해, 이 가상호스트에서 실행중인 다른 웹어플리케이션에 대한 요청디스패쳐(request dispatcher)를 성공적으로 얻을 수 있습니다. 보안상의 이유로 false(디폴트)로 지정하면 getContext()는 언제나 null을 반환하게 됩니다.
docBase 이 웹어플리케이션에 대한 Document Base (Context Root로도 알려져 있습니다) 디렉토리, 또는 웹어플리케이션 아카이브 파일의 경로명(웹어플리케이션을 WAR 파일로 직접 실행하는 경우)을 나타냅니다. 이 디렉토리나 WAR 파일에에 대한 절대경로명을 지정할 수도 있고, 이 Context가 정의된 Host의 appBase 디렉토리에 대한 상대경로명을 지정할 수도 있습니다
override true로 설정하면 DefaultContext element를 관련된 host에서 명백하게 상속받아 사용합니다
기본값으로 Defaultcontext element가 사용됩니다
privileged true로 설정하면 이 컨텍스트는 관리자서블릿(manager servlet) 같은 컨테이너 서블릿을 사용할 수 있습니다.
path 이 웹어플리케이션의 컨텍스트 경로(context path)를 나타내며, 각 요청 URI의 시작부분이 컨텍스트 경로와 같을 때 해당 웹어플리케이션이 그 요청을 처리하게 됩니다. 하나의 특정 Host 내의 컨텍스트 경로들은 모두 각각 유일해야 합니다. 만약 컨텍스트 경로를 빈 스트링("")으로 지정하면, 이 Context는 이 Host에 대한 디폴트 웹어플리케이션으로 정의된 것입니다. 디폴트 웹어플리케이션은 다른 Context 들에 해당되지 않는 모든 요청을 처리할 것입니다.
reloadable true로 지정하면, Catalina는 /WEB-INF/classes/와 /WEB-INF/lib 안 클래스 들의 변경여부를 감시하다가, 변경이 발견되면 웹어플리케이션을 자동으로 재적재(reload)합니다. 이 기능은 개발중에는 매우 유용하지만 얼마간의 실행부하(runtime overhead)가 발생하므로, 실제 운영할 용도로 어플리케이션을 배치(deploy)할 때는 사용하지 않도록 합니다. 그러나 이미 배치가 끝난 어플리케이션이라도 Manager 웹어플리케이션을 이용하면 필요할 때 재적재 하도록 할 수 있습니다
wrapperClass 이 Context로 관리할 서블릿 들에 대해 사용할 org.apache.catalina.Wrapper 구현체 클래스의 Java 클래스명입니다. 지정하지 않으면 표준값이 사용됩니다

2014년 3월 19일 수요일

[javascript] Date Control

To get year - should use getFullYear() instead getYear()
To get month - should be add '1' (getMonth() is array. array starts from '0')

-- HTML

<div>
    <table><tbody>
            <tr>
                <th>today</th><td id="today"></td>
            </tr>
            <tr>
                <th>year</th><td id="year"></td>
            </tr>
            <tr>
                <th>fullYear</th><td id="fullYear"></td>
            </tr>
            <tr>
                <th>month</th><td id="month"></td>
            </tr>
            <tr>
                <th>month_add</th><td id="month_add"></td>
            </tr>
            <tr>
                <th>date</th><td id="date"></td>
            </tr>
            <tr>
                <th>day</th><td id="day"></td>
            </tr>
            <tr>
                <th>day-Kor</th><td id="dayKor"></td>
            </tr>
            <tr>
                <th>3/20/2014</th><td id="inputDate"></td>
            </tr>
            <tr>
                <th>ReverseToStr</th><td id="reverseToStr"></td>
            </tr>
    </tbody></table>
</div>

-- Script

$(document).ready(function(){
    var today = new Date();
    //alert(today);
    $('#today').text(today);
    $('#year').text(today.getYear());
    $('#fullYear').text(today.getFullYear());
    $('#month').text(today.getMonth());
    $('#month_add').text(today.getMonth()+1);
    $('#date').text(today.getDate());
    $('#day').text(today.getDay());
    $('#dayKor').text(dayToKor(today.getDay()));
 
    $('#inputDate').text(new Date('3/20/2014 17:30:30'));
    $('#reverseToStr').text('2014-03-20'.replace(/-/gi,''));
});

function dayToKor(num){
    var week = ["일","월","화","수","목","금","토"];  
    return week[num];
}

-- Result

todayThu Mar 20 2014 11:53:54 GMT+0900 (대한민국 표준시)
year114
fullYear2014
month2
month_add3
date20
day4
day-Kor
3/20/2014Thu Mar 20 2014 17:30:30 GMT+0900 (대한민국 표준시)
ReverseToStr20140320

[jQuery] not()

jQuery not()

특정 클래스를 제외한 체크된 모든 수를 가져오기 예제

-- HTML

<input type="button" id="ok" value="click">
<div id ="list">
    <input type="checkbox" class="a b"/>
    <input type="checkbox" class="a b"/>
    <input type="checkbox" class="a c"/>
</div>
<div>
    list:::<span id="aaa"></span></br>
    checked:::<span id="bbb"></span></br>
    checked but not b:::<span id="ccc"></span></br>

-- Script

$(document).ready(function(){
    $('#ok').click(function(){
        $('#aaa').text($('#list').size());
        $('#bbb').text($('.a:checked','#list').size());
        $('#ccc').text($('.a:checked:not(.b)','#list').size());
    });
});

-- Result


  
list:::1
checked:::2
checked but not b:::1

2014년 3월 18일 화요일

RGB code

white #ffffff
whitesmoke #f5f5f5
mintcream #f5fffa
azure #f0ffff
ghostwhite #f8f8ff
aliceblue #f0f8ff
snow #fffafa
floralwhite #fffaf0
ivory #fffff0
seashell #fff5ee
honeydew #f0fff0
oldlace #fdf5e6
beige #f5f5dc
cornsilk #fff8dc
linen #faf0e6
papayawhip #ffefd5
wheat #f5deb3
blanchedalmond #ffebcd
moccasin #ffe4b5
bisque #ffe4c4
navajowhite #ffdead
lightyellow #ffffe0
lightgoldenrodyellow #fafad2
lemonchiffon #fffacd
palegoldenrod #eee8aa
lavenderblush #fff0f5
mistyrose #ffe4e1
antiquewhite #faebd7
lavender #e6e6fa
lightcyan #e0ffff
powderblue #b0e0e6
paleturquoise #afeeee
lightblue #add8e6
skyblue #87ceeb
lightskyblue #87cefa
deepskyblue #00bfFf
cornflowerblue #6495ed
dodgerblue #1e90ff
royalblue #4169e1
slateblue #6a5acd
mediumblue #0000cd
blue #0000ff
mediumslateblue #7b68ee
steelblue #4682b4
cyan #00ffff
darkblue #00008b
darkslateblue #483d8b
lightpink #ffb6c1
pink #ffc0cb
thistle #d8bfd8
plum #dda0dd
violet #ee82ee
orchid #da70d6
mediumorchid #ba55d3
fuchsia #ff00ff
magenta #ff00ff
hotpink #ff69b4
deeppink #ff1493
peachpuff #ffdab9
khaki #f0e68c
lightsalmon #ffa07a
orange #ffa500
darkorange #ff8c00
darksalmon #e9967a
coral #ff7f50
salmon #fa8072
lightcoral #f08080
tomato #ff6347
red #ff0000
orangered #ff4500
crimson #dc143c
burlywood #deb887
sandybrown #f4a460
tan #d2b48c
gold #ffd700
darkgoldenrod #b8860b
goldenrod #daa520
brass #b5a642
peru #cd853f
chocolate #d2691e
indianred #cd5c5c
sienna #a0522d
brown #a52a2a
darkred #8b0000
firebrick #b22222
maroon #800000
saddlebrown #8b4513
palegreen #98fb98
greenyellow #adff2f
mediumspringgreen #00fa9a
lawngreen #7cfc00
lime #00ff00
chartreuse #7fff00
springgreen #00ff7f
lightgreen #90ee90
limegreen #32cd32
forestgreen #228b22
mediumseagreen #3cb371
seagreen #2e8b57
yellowgreen #9acd32
aquamarine #7fffd4
black #000000
blueviolet #8a2be2
cadetblue #5f9ea0
darkcyan #008b8b
darkgray #a9a9a9
darkgreen #006400
darkmagenta #8b008b
darkolivegreen #556b2f
darkorchid #9932cc
darkseagreen #8fbc8f
darkslategray #2f4f4f
darkturquoise #00ced1
darkviolet #9400d3
dimgray #696969
gainsboro #dcdcdc
gray #808080
green #008000
indigo #4b0082
lightgrey #d3d3d3
lightseagreen #20b2aa
lightslategray #778899
lightsteelblue #b0c4de
mediumaquamarine #66cdaa
mediumpurple #9370db
mediumturquoise #48d1cc
mediumvioletred #c71585
midnightblue #191970
navy #000080
olive #808000
olivedrab #6b8e23
palevioletred #db7093
purple #800080
rosybrown #bc8f8f
silver #c0c0c0
slategray #708090
teal #008080
turquoise #40e0d0
darkkhaki #bdb76b
yellow #ffff00
aqua #00ffff