+--[[
+
+Luci statistics - diagram color helper class
+(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+]]--
+
module("luci.statistics.rrdtool.colors", package.seeall)
require("luci.util")
-require("luci.bits")
Instance = luci.util.class()
function Instance.from_string( self, s )
return {
- luci.bits.Hex2Dec(s:sub(1,2)),
- luci.bits.Hex2Dec(s:sub(3,4)),
- luci.bits.Hex2Dec(s:sub(5,6))
+ tonumber(s:sub(1,2), 16),
+ tonumber(s:sub(3,4), 16),
+ tonumber(s:sub(5,6), 16)
}
end