@@ 213-222 (lines=10) @@ | ||
210 | /** |
|
211 | * Get the colour code set for Bg and Fg |
|
212 | */ |
|
213 | public function getSelectedSetCode() : string |
|
214 | { |
|
215 | return sprintf( |
|
216 | "\033[%sm", |
|
217 | implode(';', [ |
|
218 | self::$availableBackgroundColors[$this->getFg()]['set'], |
|
219 | self::$availableForegroundColors[$this->getBg()]['set'], |
|
220 | ]) |
|
221 | ); |
|
222 | } |
|
223 | ||
224 | /** |
|
225 | * Get the colour unset code for Bg and Fg |
|
@@ 227-236 (lines=10) @@ | ||
224 | /** |
|
225 | * Get the colour unset code for Bg and Fg |
|
226 | */ |
|
227 | public function getSelectedUnsetCode() : string |
|
228 | { |
|
229 | return sprintf( |
|
230 | "\033[%sm", |
|
231 | implode(';', [ |
|
232 | self::$availableBackgroundColors[$this->getBg()]['unset'], |
|
233 | self::$availableForegroundColors[$this->getFg()]['unset'], |
|
234 | ]) |
|
235 | ); |
|
236 | } |
|
237 | ||
238 | /** |
|
239 | * Get the inverted colour code |
|
@@ 241-250 (lines=10) @@ | ||
238 | /** |
|
239 | * Get the inverted colour code |
|
240 | */ |
|
241 | public function getUnselectedSetCode() : string |
|
242 | { |
|
243 | return sprintf( |
|
244 | "\033[%sm", |
|
245 | implode(';', [ |
|
246 | self::$availableBackgroundColors[$this->getBg()]['set'], |
|
247 | self::$availableForegroundColors[$this->getFg()]['set'], |
|
248 | ]) |
|
249 | ); |
|
250 | } |
|
251 | ||
252 | /** |
|
253 | * Get the inverted colour unset code |
|
@@ 255-264 (lines=10) @@ | ||
252 | /** |
|
253 | * Get the inverted colour unset code |
|
254 | */ |
|
255 | public function getUnselectedUnsetCode() : string |
|
256 | { |
|
257 | return sprintf( |
|
258 | "\033[%sm", |
|
259 | implode(';', [ |
|
260 | self::$availableBackgroundColors[$this->getBg()]['unset'], |
|
261 | self::$availableForegroundColors[$this->getFg()]['unset'], |
|
262 | ]) |
|
263 | ); |
|
264 | } |
|
265 | ||
266 | /** |
|
267 | * Calculate the contents width |