2727SimpleColor (r:: Integer , g:: Integer , b:: Integer ) = SimpleColor ((; r= UInt8 (r), g= UInt8 (g), b= UInt8 (b)))
2828SimpleColor (rgb:: UInt32 ) = SimpleColor (reverse (reinterpret (UInt8, [rgb]))[2 : end ]. .. )
2929
30- convert (:: Type{SimpleColor} , (; r, g, b):: RGBTuple ) = SimpleColor ((; r, g, b))
31- convert (:: Type{SimpleColor} , namedcolor:: Symbol ) = SimpleColor (namedcolor)
32- convert (:: Type{SimpleColor} , rgb:: UInt32 ) = SimpleColor (rgb)
30+ Base . convert (:: Type{SimpleColor} , (; r, g, b):: RGBTuple ) = SimpleColor ((; r, g, b))
31+ Base . convert (:: Type{SimpleColor} , namedcolor:: Symbol ) = SimpleColor (namedcolor)
32+ Base . convert (:: Type{SimpleColor} , rgb:: UInt32 ) = SimpleColor (rgb)
3333
3434"""
3535 tryparse(::Type{SimpleColor}, rgb::String)
@@ -175,7 +175,7 @@ Base.copy(f::Face) =
175175 f. foreground, f. background, f. underline,
176176 f. strikethrough, f. inverse, copy (f. inherit))
177177
178- function show (io:: IO , :: MIME"text/plain" , color:: SimpleColor )
178+ function Base . show (io:: IO , :: MIME"text/plain" , color:: SimpleColor )
179179 skiptype = get (io, :typeinfo , nothing ) === SimpleColor
180180 skiptype || show (io, SimpleColor)
181181 skiptype || print (io, ' (' )
@@ -195,7 +195,7 @@ function show(io::IO, ::MIME"text/plain", color::SimpleColor)
195195 nothing
196196end
197197
198- function show (io:: IO , color:: SimpleColor )
198+ function Base . show (io:: IO , color:: SimpleColor )
199199 show (io, SimpleColor)
200200 print (io, ' (' )
201201 if color. value isa RGBTuple
@@ -210,7 +210,7 @@ function show(io::IO, color::SimpleColor)
210210 print (io, ' )' )
211211end
212212
213- function show (io:: IO , :: MIME"text/plain" , face:: Face )
213+ function Base . show (io:: IO , :: MIME"text/plain" , face:: Face )
214214 if get (io, :compact , false ):: Bool
215215 show (io, Face)
216216 if get (io, :color , false ):: Bool
@@ -285,7 +285,7 @@ function show(io::IO, ::MIME"text/plain", face::Face)
285285 end
286286end
287287
288- function show (io:: IO , face:: Face )
288+ function Base . show (io:: IO , face:: Face )
289289 show (IOContext (io, :compact => true ), MIME (" text/plain" ), face)
290290end
291291
@@ -489,7 +489,7 @@ withfaces(f) = f()
489489Merge the properties of the `initial` face and `others`, with
490490later faces taking priority.
491491"""
492- function merge (a:: Face , b:: Face )
492+ function Base . merge (a:: Face , b:: Face )
493493 if isempty (b. inherit)
494494 Face (ifelse (isnothing (b. font), a. font, b. font),
495495 if isnothing (b. height) a. height
@@ -515,7 +515,7 @@ function merge(a::Face, b::Face)
515515 end
516516end
517517
518- merge (a:: Face , b:: Face , others:: Face... ) = merge (merge (a, b), others... )
518+ Base . merge (a:: Face , b:: Face , others:: Face... ) = merge (merge (a, b), others... )
519519
520520# # Getting the combined face from a set of properties ##
521521
@@ -647,7 +647,7 @@ Load all faces declared in the Faces.toml file `tomlfile`.
647647"""
648648loaduserfaces! (tomlfile:: String ) = loaduserfaces! (Base. parsed_toml (tomlfile))
649649
650- function convert (:: Type{Face} , spec:: Dict )
650+ function Base . convert (:: Type{Face} , spec:: Dict )
651651 Face (if haskey (spec, " font" ) && spec[" font" ] isa String
652652 spec[" font" ] end ,
653653 if haskey (spec, " height" ) && (spec[" height" ] isa Int || spec[" height" ] isa Float64)
0 commit comments