Colourable piece of legislation-Definition

What is a colourable piece of legislation has been laid down by  Supreme Court in K. C. Gajapati Narayan Deo and others (1954) SCR 1. It was pointed there that:

“The question whether a law was a colourable legislation and as such void did not depend on the motive or bona fides of the legislature in passing the law but upon the competency of the legislature to pass that particular law, and what the courts have to determine in such cases is whether though the legislature has purported to act within the limits of its powers, it has in substance and reality transgressed those powers, the transgression being veiled by what appears, on proper examination, to be a mere pretence or disguise. The whole doctrine of colourable legislation is based upon the maxim that you cannot do indirectly what you cannot do directly.”

If the Constitution of a State distributes the legislative powers amongst different bodies, which have to act within their respective spheres marked out by specific legislative entries, or if there are limitations on the legislative authority in the shape of fundamental rights, questions do arise as to whether the legislature in a particular case has or has not, in respect to the subject-matter of the statute or in the method of enacting it, transgressed the limits of its constitutional powers. Such transgression may be patent, manifest or direct, but it may also be disguised, covert and indirect and it is to this latter class of cases that the expression “colourable legislation” has been applied in certain judicial pronouncements. The idea conveyed by the expression is that although apparently a legislature in passing a statute purported to act within the limits of its powers, yet in substance and in reality it transgressed these powers the transgression being velled by what appears, on proper examination, to be a mere pretence or disguise.